diff options
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -38,7 +38,7 @@ struct commit *lookup_commit_or_die(const unsigned char *sha1, const char *ref_n struct commit *c = lookup_commit_reference(sha1); if (!c) die(_("could not parse %s"), ref_name); - if (hashcmp(sha1, c->object.sha1)) { + if (hashcmp(sha1, get_object_hash(c->object))) { warning(_("%s %s is not a commit!"), ref_name, sha1_to_hex(sha1)); } @@ -262,7 +262,7 @@ const void *get_commit_buffer(const struct commit *commit, unsigned long *sizep) if (!ret) { enum object_type type; unsigned long size; - ret = read_sha1_file(commit->object.sha1, &type, &size); + ret = read_sha1_file(get_object_hash(commit->object), &type, &size); if (!ret) die("cannot read commit object %s", sha1_to_hex(commit->object.sha1)); @@ -335,7 +335,7 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s bufptr += tree_entry_len + 1; /* "tree " + "hex sha1" + "\n" */ pptr = &item->parents; - graft = lookup_commit_graft(item->object.sha1); + graft = lookup_commit_graft(get_object_hash(item->object)); while (bufptr + parent_entry_len < tail && !memcmp(bufptr, "parent ", 7)) { struct commit *new_parent; @@ -380,7 +380,7 @@ int parse_commit_gently(struct commit *item, int quiet_on_missing) return -1; if (item->object.parsed) return 0; - buffer = read_sha1_file(item->object.sha1, &type, &size); + buffer = read_sha1_file(get_object_hash(item->object), &type, &size); if (!buffer) return quiet_on_missing ? -1 : error("Could not read %s", @@ -563,7 +563,7 @@ void clear_commit_marks_for_object_array(struct object_array *a, unsigned mark) for (i = 0; i < a->nr; i++) { object = a->objects[i].item; - commit = lookup_commit_reference_gently(object->sha1, 1); + commit = lookup_commit_reference_gently(get_object_hash(*object), 1); if (commit) clear_commit_marks(commit, mark); } @@ -1206,7 +1206,7 @@ static void handle_signed_tag(struct commit *parent, struct commit_extra_header desc = merge_remote_util(parent); if (!desc || !desc->obj) return; - buf = read_sha1_file(desc->obj->sha1, &type, &size); + buf = read_sha1_file(get_object_hash(*desc->obj), &type, &size); if (!buf || type != OBJ_TAG) goto free_return; len = parse_signature(buf, size); |