Skip to content

Commit 450b908

Browse files
committed
Merge branch 'hv/mv-nested-submodules-test'
A test to demonstrate "git mv" failing to adjust nested submodules has been added. * hv/mv-nested-submodules-test: add test for bug in git-mv for recursive submodules
2 parents a36f631 + c514167 commit 450b908

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

t/t7001-mv.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,4 +491,29 @@ test_expect_success 'moving a submodule in nested directories' '
491491
test_cmp actual expect
492492
'
493493

494+
test_expect_failure 'moving nested submodules' '
495+
git commit -am "cleanup commit" &&
496+
mkdir sub_nested_nested &&
497+
(cd sub_nested_nested &&
498+
touch nested_level2 &&
499+
git init &&
500+
git add . &&
501+
git commit -m "nested level 2"
502+
) &&
503+
mkdir sub_nested &&
504+
(cd sub_nested &&
505+
touch nested_level1 &&
506+
git init &&
507+
git add . &&
508+
git commit -m "nested level 1"
509+
git submodule add ../sub_nested_nested &&
510+
git commit -m "add nested level 2"
511+
) &&
512+
git submodule add ./sub_nested nested_move &&
513+
git commit -m "add nested_move" &&
514+
git submodule update --init --recursive &&
515+
git mv nested_move sub_nested_moved &&
516+
git status
517+
'
518+
494519
test_done

0 commit comments

Comments
 (0)