From 2490574d15cab6e8d955dc4132cf9e7e83fc1172 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Sat, 28 Jan 2017 23:03:03 +0100 Subject: use oid_to_hex_r() for converting struct object_id hashes to hex strings Patch generated by Coccinelle and contrib/coccinelle/object_id.cocci. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin/merge-index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/merge-index.c') diff --git a/builtin/merge-index.c b/builtin/merge-index.c index ce356b1da1..2d1b6db6bd 100644 --- a/builtin/merge-index.c +++ b/builtin/merge-index.c @@ -22,7 +22,7 @@ static int merge_entry(int pos, const char *path) if (strcmp(ce->name, path)) break; found++; - sha1_to_hex_r(hexbuf[stage], ce->oid.hash); + oid_to_hex_r(hexbuf[stage], &ce->oid); xsnprintf(ownbuf[stage], sizeof(ownbuf[stage]), "%o", ce->ce_mode); arguments[stage] = hexbuf[stage]; arguments[stage + 4] = ownbuf[stage]; -- cgit v1.2.3