From f2fd0760f62e79609fef7bfd7ecebb002e8e4ced Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 10 Nov 2015 02:22:28 +0000 Subject: Convert struct object to object_id struct object is one of the major data structures dealing with object IDs. Convert it to use struct object_id instead of an unsigned char array. Convert get_object_hash to refer to the new member as well. Signed-off-by: brian m. carlson Signed-off-by: Jeff King --- sha1_name.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sha1_name.c') diff --git a/sha1_name.c b/sha1_name.c index d94657e340..37ba126d9b 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -738,7 +738,7 @@ static int peel_onion(const char *name, int len, unsigned char *sha1) o = deref_tag(o, name, sp - name - 2); if (!o || (!o->parsed && !parse_object(get_object_hash(*o)))) return -1; - hashcpy(sha1, o->sha1); + hashcpy(sha1, o->oid.hash); return 0; } @@ -1022,7 +1022,7 @@ int get_sha1_mb(const char *name, unsigned char *sha1) st = -1; else { st = 0; - hashcpy(sha1, mbs->item->object.sha1); + hashcpy(sha1, mbs->item->object.oid.hash); } free_commit_list(mbs); return st; -- cgit v1.2.3