]> git.ipfire.org Git - thirdparty/git.git/commit - transport.c
fetch_refs_via_pack: call report_unmatched_refs
authorMatt McCutchen <matt@mattmccutchen.net>
Wed, 22 Feb 2017 16:02:15 +0000 (11:02 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Mar 2017 19:12:53 +0000 (11:12 -0800)
commite70a65c5d89e4543491082d4b361398fd87433db
treee59d3ecf534467db0b058d4273b6727cd09432e4
parente860d96bf89fca63f664eb2d507f2f14537a9008
fetch_refs_via_pack: call report_unmatched_refs

"git fetch" currently doesn't bother to check that it got all refs it
sought, because the common case of requesting a nonexistent ref triggers
a die() in get_fetch_map.  However, there's at least one case that
slipped through: "git fetch REMOTE SHA1" if the server doesn't allow
requests for unadvertised objects.  Make fetch_refs_via_pack (which is
on the "git fetch" code path) call report_unmatched_refs so that we at
least get an error message in that case.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5516-fetch-push.sh
transport.c