Skip to content

Commit 21758af

Browse files
mhaggergitster
authored andcommitted
send_ref(): convert local variable "peeled" to object_id
Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 363e98b commit 21758af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

upload-pack.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
717717
" side-band-64k ofs-delta shallow no-progress"
718718
" include-tag multi_ack_detailed";
719719
const char *refname_nons = strip_namespace(refname);
720-
unsigned char peeled[20];
720+
struct object_id peeled;
721721

722722
if (mark_our_ref(refname, oid))
723723
return 0;
@@ -738,8 +738,8 @@ static int send_ref(const char *refname, const struct object_id *oid,
738738
packet_write(1, "%s %s\n", oid_to_hex(oid), refname_nons);
739739
}
740740
capabilities = NULL;
741-
if (!peel_ref(refname, peeled))
742-
packet_write(1, "%s %s^{}\n", sha1_to_hex(peeled), refname_nons);
741+
if (!peel_ref(refname, peeled.hash))
742+
packet_write(1, "%s %s^{}\n", oid_to_hex(&peeled), refname_nons);
743743
return 0;
744744
}
745745

0 commit comments

Comments
 (0)