diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:29 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | ed1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch) | |
tree | f5b52ccae09103672c62c1c11ff0bddc78199829 /builtin/fast-export.c | |
parent | Convert struct object to object_id (diff) | |
download | tgif-ed1c9977cb1b63e4270ad8bdf967a2d02580aa08.tar.xz |
Remove get_object_hash.
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object. This provides no
functional change, as it is essentially a macro substitution.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/fast-export.c')
-rw-r--r-- | builtin/fast-export.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 1337a2385a..d9ac5d8410 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -562,11 +562,11 @@ static void handle_commit(struct commit *commit, struct rev_info *rev) get_object_mark(&commit->parents->item->object) != 0 && !full_tree) { parse_commit_or_die(commit->parents->item); - diff_tree_sha1(get_object_hash(commit->parents->item->tree->object), - get_object_hash(commit->tree->object), "", &rev->diffopt); + diff_tree_sha1(commit->parents->item->tree->object.oid.hash, + commit->tree->object.oid.hash, "", &rev->diffopt); } else - diff_root_tree_sha1(get_object_hash(commit->tree->object), + diff_root_tree_sha1(commit->tree->object.oid.hash, "", &rev->diffopt); /* Export the referenced blobs, and remember the marks. */ @@ -665,7 +665,7 @@ static void handle_tag(const char *name, struct tag *tag) return; } - buf = read_sha1_file(get_object_hash(tag->object), &type, &size); + buf = read_sha1_file(tag->object.oid.hash, &type, &size); if (!buf) die ("Could not read tag %s", oid_to_hex(&tag->object.oid)); message = memmem(buf, size, "\n\n", 2); @@ -777,7 +777,7 @@ static struct commit *get_commit(struct rev_cmdline_entry *e, char *full_name) /* handle nested tags */ while (tag && tag->object.type == OBJ_TAG) { - parse_object(get_object_hash(tag->object)); + parse_object(tag->object.oid.hash); string_list_append(&extra_refs, full_name)->util = tag; tag = (struct tag *)tag->tagged; } @@ -828,7 +828,7 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info) case OBJ_COMMIT: break; case OBJ_BLOB: - export_blob(get_object_hash(commit->object)); + export_blob(commit->object.oid.hash); continue; default: /* OBJ_TAG (nested tags) is already handled */ warning("Tag points to object of unexpected type %s, skipping.", |