summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 15c18b6..b99177f 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -293,4 +293,23 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
git diff-files --quiet
'
+test_expect_success 'git mv moves a submodule with gitfile' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ (
+ cd mod &&
+ git mv ../sub/ .
+ ) &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_done