Skip to content

Commit f8ddeff

Browse files
bk2204gitster
authored andcommitted
builtin/fmt-merge-msg: convert remaining code to object_id
We were using the util pointer, which is a pointer to void, as an unsigned char pointer. The pointer actually points to a struct origin_data, which has a struct object_id as its first member, which in turn has an unsigned char array as its first member, so this was valid. Since we want to convert this to struct object_id, simply change the pointer we're using. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent abef902 commit f8ddeff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/fmt-merge-msg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,10 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
485485
struct strbuf tagbuf = STRBUF_INIT;
486486

487487
for (i = 0; i < origins.nr; i++) {
488-
unsigned char *sha1 = origins.items[i].util;
488+
struct object_id *oid = origins.items[i].util;
489489
enum object_type type;
490490
unsigned long size, len;
491-
char *buf = read_sha1_file(sha1, &type, &size);
491+
char *buf = read_sha1_file(oid->hash, &type, &size);
492492
struct strbuf sig = STRBUF_INIT;
493493

494494
if (!buf || type != OBJ_TAG)

0 commit comments

Comments
 (0)