diff options
author | Glen Choo <chooglen@google.com> | 2022-03-05 01:14:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-05 01:39:12 +0100 |
commit | 104744f91d9d04763ab2df06308bfa3c0b464f84 (patch) | |
tree | fff3265fef8a48cc1c72831221d6e11df893061d | |
parent | submodule--helper: remove ensure-core-worktree (diff) | |
download | git-104744f91d9d04763ab2df06308bfa3c0b464f84.tar.xz git-104744f91d9d04763ab2df06308bfa3c0b464f84.zip |
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 <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7406-submodule-update.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index 7764c1c3cb..000e055811 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -1071,4 +1071,16 @@ test_expect_success 'submodule update --quiet passes quietness to fetch with a s ) ' +test_expect_success 'submodule update --filter requires --init' ' + test_expect_code 129 git -C super submodule update --filter blob:none +' + +test_expect_success 'submodule update --filter sets partial clone settings' ' + test_when_finished "rm -rf super-filter" && + git clone cloned super-filter && + git -C super-filter submodule update --init --filter blob:none && + test_cmp_config -C super-filter/submodule true remote.origin.promisor && + test_cmp_config -C super-filter/submodule blob:none remote.origin.partialclonefilter +' + test_done |