diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:36 -0700 |
commit | 6d71443d8e6da9e3d412f91b5f5e9dd95a058ed1 (patch) | |
tree | 6b6afb01982a2752d55a9e3b30d618d6fb829859 /t/t5510-fetch.sh | |
parent | Merge branch 'ab/pack-stdin-packs-fix' into maint (diff) | |
parent | fetch: die on invalid --negotiation-tip hash (diff) | |
download | tgif-6d71443d8e6da9e3d412f91b5f5e9dd95a058ed1.tar.xz |
Merge branch 'jt/push-negotiation-fixes' into maint
Bugfix for common ancestor negotiation recently introduced in "git
push" codepath.
* jt/push-negotiation-fixes:
fetch: die on invalid --negotiation-tip hash
send-pack: fix push nego. when remote has refs
send-pack: fix push.negotiate with remote helper
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-x | t/t5510-fetch.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index e83b2a6506..a0faf0dd94 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -1214,6 +1214,19 @@ test_expect_success '--negotiation-tip understands abbreviated SHA-1' ' check_negotiation_tip ' +test_expect_success '--negotiation-tip rejects missing OIDs' ' + setup_negotiation_tip server server 0 && + test_must_fail git -C client fetch \ + --negotiation-tip=alpha_1 \ + --negotiation-tip=$(test_oid zero) \ + origin alpha_s beta_s 2>err && + cat >fatal-expect <<-EOF && + fatal: the object $(test_oid zero) does not exist +EOF + grep fatal: err >fatal-actual && + test_cmp fatal-expect fatal-actual +' + . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd |