path: root/builtin/fmt-merge-msg.c
diff options
authorbrian m. carlson <>2018-03-12 02:27:47 (GMT)
committerJunio C Hamano <>2018-03-14 16:23:49 (GMT)
commitf8ddeff50930d7c330b6f68745631c34e63540bd (patch)
tree04b406f63947acc474817af4bd2bd1663d1bfbce /builtin/fmt-merge-msg.c
parentabef9020e3df87c441c9a3a95f592fce5fa49bb9 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 8e8a15e..0bc0dda 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -485,10 +485,10 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
struct strbuf tagbuf = STRBUF_INIT;
for (i = 0; i <; i++) {
- unsigned char *sha1 = origins.items[i].util;
+ struct object_id *oid = origins.items[i].util;
enum object_type type;
unsigned long size, len;
- char *buf = read_sha1_file(sha1, &type, &size);
+ char *buf = read_sha1_file(oid->hash, &type, &size);
struct strbuf sig = STRBUF_INIT;
if (!buf || type != OBJ_TAG)