builtin/diff-tree: cleanup references to sha1
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
May 30, 2017 at 10:31 UTC
315f49f20bfbe65cecc2adfe6131588647c57ed4
1 file changed
+3
-5
builtin/diff-tree.c
+3
-5
@@ -7,7 +7,7 @@
7
8
static struct rev_info log_tree_opt;
9
10
-static int diff_tree_commit_sha1(const struct object_id *oid)
10
+static int diff_tree_commit_oid(const struct object_id *oid)
11
{
12
struct commit *commit = lookup_commit_reference(oid);
13
if (!commit)
@@ -98,7 +98,6 @@ static void diff_tree_tweak_rev(struct rev_info *rev, struct setup_revision_opt
98
99
int cmd_diff_tree(int argc, const char **argv, const char *prefix)
100
{
101
- int nr_sha1;
101
char line[1000];
102
struct object *tree1, *tree2;
103
static struct rev_info *opt = &log_tree_opt;
@@ -132,15 +131,14 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
131
* reverse the order of the objects if the second one
132
* is marked UNINTERESTING.
133
*/
135
- nr_sha1 = opt->pending.nr;
136
- switch (nr_sha1) {
134
+ switch (opt->pending.nr) {
135
case 0:
136
if (!read_stdin)
137
usage(diff_tree_usage);
138
break;
139
case 1:
140
tree1 = opt->pending.objects[0].item;
143
- diff_tree_commit_sha1(&tree1->oid);
141
+ diff_tree_commit_oid(&tree1->oid);
142
break;
143
case 2:
144
tree1 = opt->pending.objects[0].item;