Skip to content

Commit 63d963a

Browse files
stefanbellergitster
authored andcommitted
t/lib-submodule-update.sh: fix test ignoring ignored files in submodules
It turns out that the test replacing a submodule with a file with the submodule containing an ignored file is incorrectly titled, because the test put the file in place, but never ignored that file. When having an untracked file Instead of an ignored file in the submodule, git should refuse to remove the submodule, but that is a bug in the implementation of recursing into submodules, such that the test just passed, removing the untracked file. Fix the test first; in a later patch we'll fix gits behavior, that will make sure untracked files are not deleted. Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6419a12 commit 63d963a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/lib-submodule-update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ test_submodule_switch_recursing_with_args () {
885885
(
886886
cd submodule_update &&
887887
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
888+
echo ignored >.git/modules/sub1/info/exclude &&
888889
: >sub1/ignored &&
889890
$command replace_sub1_with_file &&
890891
test_superproject_content origin/replace_sub1_with_file &&

0 commit comments

Comments
 (0)