Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 05:22:29 +0300
committerJeff King <peff@peff.net>2015-11-20 16:02:05 +0300
commited1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch)
treef5b52ccae09103672c62c1c11ff0bddc78199829 /builtin/diff-tree.c
parentf2fd0760f62e79609fef7bfd7ecebb002e8e4ced (diff)
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/diff-tree.c')
-rw-r--r--builtin/diff-tree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index 6fef266ea3..2a12b81e06 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -51,7 +51,7 @@ static int stdin_diff_trees(struct tree *tree1, char *line, int len)
return -1;
printf("%s %s\n", oid_to_hex(&tree1->object.oid),
oid_to_hex(&tree2->object.oid));
- diff_tree_sha1(get_object_hash(tree1->object), get_object_hash(tree2->object),
+ diff_tree_sha1(tree1->object.oid.hash, tree2->object.oid.hash,
"", &log_tree_opt.diffopt);
log_tree_diff_flush(&log_tree_opt);
return 0;
@@ -139,7 +139,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
break;
case 1:
tree1 = opt->pending.objects[0].item;
- diff_tree_commit_sha1(get_object_hash(*tree1));
+ diff_tree_commit_sha1(tree1->oid.hash);
break;
case 2:
tree1 = opt->pending.objects[0].item;
@@ -149,8 +149,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
tree2 = tree1;
tree1 = tmp;
}
- diff_tree_sha1(get_object_hash(*tree1),
- get_object_hash(*tree2),
+ diff_tree_sha1(tree1->oid.hash,
+ tree2->oid.hash,
"", &opt->diffopt);
log_tree_diff_flush(opt);
break;