summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-21 15:03:27 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-21 15:03:27 -0700
commitf4470f2db0b15ae14408dcb3b5365aac550ef41e (patch)
tree93c705200b7a01d05701a3ba12fc218076cbcf8f
parente36e28e6971e9b9975d46485dfbfa5cc3fbd41ed (diff)
parentbdb31eada76fd27d18e981c3b40889297fa889c6 (diff)
downloadgit-f4470f2db0b15ae14408dcb3b5365aac550ef41e.tar.gz
Merge branch 'jt/upload-pack-error-report' into maint
"git upload-pack", which is a counter-part of "git fetch", did not report a request for a ref that was not advertised as invalid. This is generally not a problem (because "git fetch" will stop before making such a request), but is the right thing to do. * jt/upload-pack-error-report: upload-pack: report "not our ref" to client
-rw-r--r--upload-pack.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 7597ba3405..ffb028d623 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -822,9 +822,13 @@ static void receive_needs(void)
use_include_tag = 1;
o = parse_object(sha1_buf);
- if (!o)
+ if (!o) {
+ packet_write_fmt(1,
+ "ERR upload-pack: not our ref %s",
+ sha1_to_hex(sha1_buf));
die("git upload-pack: not our ref %s",
sha1_to_hex(sha1_buf));
+ }
if (!(o->flags & WANTED)) {
o->flags |= WANTED;
if (!((allow_unadvertised_object_request & ALLOW_ANY_SHA1) == ALLOW_ANY_SHA1