diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-07-18 14:45:59 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-18 14:47:30 -0700 |
| commit | a2dad4868bf0681f63fe10264c171b5a547324a5 (patch) | |
| tree | 9c32b007da84ebd4255cecdbaf7f0267c14b5995 /t/t5516-fetch-push.sh | |
| parent | parse-options: introduce OPT_IPVERSION() (diff) | |
| download | git-a2dad4868bf0681f63fe10264c171b5a547324a5.tar.gz git-a2dad4868bf0681f63fe10264c171b5a547324a5.zip | |
fetch: reject --no-ipv[46]
Now we have introduced OPT_IPVERSION(), tweak its implementation so
that "git clone", "git fetch", and "git push" reject the negated
form of "Use only IP version N" options.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5516-fetch-push.sh')
| -rwxr-xr-x | t/t5516-fetch-push.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 19ebefa5ac..87163d7745 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -120,6 +120,17 @@ test_expect_success setup ' ' +for cmd in push fetch +do + for opt in ipv4 ipv6 + do + test_expect_success "reject 'git $cmd --no-$opt'" ' + test_must_fail git $cmd --no-$opt 2>err && + grep "unknown option .no-$opt" err + ' + done +done + test_expect_success 'fetch without wildcard' ' mk_empty testrepo && ( |
