upload-pack: Improve error message when bad ref requested
When printing an error message saying a ref was requested that we do not have, only print that ref, rather than the ref and everything sent to us on the same packet line (e.g. protocol support specifications). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
b73f294150
commit
9f9aa76130
@ -549,7 +549,8 @@ static void receive_needs(void)
|
||||
*/
|
||||
o = lookup_object(sha1_buf);
|
||||
if (!o || !(o->flags & OUR_REF))
|
||||
die("git upload-pack: not our ref %s", line+5);
|
||||
die("git upload-pack: not our ref %s",
|
||||
sha1_to_hex(sha1_buf));
|
||||
if (!(o->flags & WANTED)) {
|
||||
o->flags |= WANTED;
|
||||
add_object_array(o, NULL, &want_obj);
|
||||
|
||||
Reference in New Issue
Block a user