Convert struct object to object_id
[gitweb.git] / sha1_name.c
index d94657e340c85dd2d79c8a5075f177f457b28384..37ba126d9b0887a05aaa00373dfe6687e1f79038 100644 (file)
@@ -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;