summaryrefslogtreecommitdiff
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:29 +0000
committerLibravatar Jeff King <peff@peff.net>2015-11-20 08:02:05 -0500
commited1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch)
treef5b52ccae09103672c62c1c11ff0bddc78199829 /builtin/rev-parse.c
parentConvert struct object to object_id (diff)
downloadtgif-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/rev-parse.c')
-rw-r--r--builtin/rev-parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 9985949ccc..7e074aad40 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -282,7 +282,7 @@ static int try_difference(const char *arg)
exclude = get_merge_bases(a, b);
while (exclude) {
struct commit *commit = pop_commit(&exclude);
- show_rev(REVERSED, get_object_hash(commit->object), NULL);
+ show_rev(REVERSED, commit->object.oid.hash, NULL);
}
}
*dotdot = '.';
@@ -319,7 +319,7 @@ static int try_parent_shorthands(const char *arg)
commit = lookup_commit_reference(sha1);
for (parents = commit->parents; parents; parents = parents->next)
show_rev(parents_only ? NORMAL : REVERSED,
- get_object_hash(parents->item->object), arg);
+ parents->item->object.oid.hash, arg);
*dotdot = '^';
return 1;