Skip to content

Commit 104744f

Browse files
chooglengitster
authored andcommitted
submodule update: add tests for --filter
Test the "--filter" option to make sure we don't break anything while refactoring "git submodule update". Signed-off-by: Glen Choo <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 97cb977 commit 104744f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t7406-submodule-update.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,4 +1071,16 @@ test_expect_success 'submodule update --quiet passes quietness to fetch with a s
10711071
)
10721072
'
10731073

1074+
test_expect_success 'submodule update --filter requires --init' '
1075+
test_expect_code 129 git -C super submodule update --filter blob:none
1076+
'
1077+
1078+
test_expect_success 'submodule update --filter sets partial clone settings' '
1079+
test_when_finished "rm -rf super-filter" &&
1080+
git clone cloned super-filter &&
1081+
git -C super-filter submodule update --init --filter blob:none &&
1082+
test_cmp_config -C super-filter/submodule true remote.origin.promisor &&
1083+
test_cmp_config -C super-filter/submodule blob:none remote.origin.partialclonefilter
1084+
'
1085+
10741086
test_done

0 commit comments

Comments
 (0)