Skip to content

Commit

Permalink
send_ref(): convert local variable "peeled" to object_id
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed May 25, 2015
1 parent 363e98b commit 21758af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upload-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
" side-band-64k ofs-delta shallow no-progress"
" include-tag multi_ack_detailed";
const char *refname_nons = strip_namespace(refname);
unsigned char peeled[20];
struct object_id peeled;

if (mark_our_ref(refname, oid))
return 0;
Expand All @@ -738,8 +738,8 @@ static int send_ref(const char *refname, const struct object_id *oid,
packet_write(1, "%s %s\n", oid_to_hex(oid), refname_nons);
}
capabilities = NULL;
if (!peel_ref(refname, peeled))
packet_write(1, "%s %s^{}\n", sha1_to_hex(peeled), refname_nons);
if (!peel_ref(refname, peeled.hash))
packet_write(1, "%s %s^{}\n", oid_to_hex(&peeled), refname_nons);
return 0;
}

Expand Down

0 comments on commit 21758af

Please sign in to comment.