Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/diff-tree: cleanup references to sha1
author
Brandon Williams
<bmwill@google.com>
Tue, 30 May 2017 17:31:04 +0000
(10:31 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 5 Jun 2017 02:23:58 +0000
(11:23 +0900)
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/diff-tree.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
66f414f
)
diff --git
a/builtin/diff-tree.c
b/builtin/diff-tree.c
index aef167619886e82ddf1aeb92c80549d8a5a43ed0..8b26a66a959d84aa7d337323ad99ec159e9e471e 100644
(file)
--- a/
builtin/diff-tree.c
+++ b/
builtin/diff-tree.c
@@
-7,7
+7,7
@@
static struct rev_info log_tree_opt;
static struct rev_info log_tree_opt;
-static int diff_tree_commit_
sha1
(const struct object_id *oid)
+static int diff_tree_commit_
oid
(const struct object_id *oid)
{
struct commit *commit = lookup_commit_reference(oid);
if (!commit)
{
struct commit *commit = lookup_commit_reference(oid);
if (!commit)
@@
-98,7
+98,6
@@
static void diff_tree_tweak_rev(struct rev_info *rev, struct setup_revision_opt
int cmd_diff_tree(int argc, const char **argv, const char *prefix)
{
int cmd_diff_tree(int argc, const char **argv, const char *prefix)
{
- int nr_sha1;
char line[1000];
struct object *tree1, *tree2;
static struct rev_info *opt = &log_tree_opt;
char line[1000];
struct object *tree1, *tree2;
static struct rev_info *opt = &log_tree_opt;
@@
-132,15
+131,14
@@
int cmd_diff_tree(int argc, const char **argv, const char *prefix)
* reverse the order of the objects if the second one
* is marked UNINTERESTING.
*/
* reverse the order of the objects if the second one
* is marked UNINTERESTING.
*/
- nr_sha1 = opt->pending.nr;
- switch (nr_sha1) {
+ switch (opt->pending.nr) {
case 0:
if (!read_stdin)
usage(diff_tree_usage);
break;
case 1:
tree1 = opt->pending.objects[0].item;
case 0:
if (!read_stdin)
usage(diff_tree_usage);
break;
case 1:
tree1 = opt->pending.objects[0].item;
- diff_tree_commit_
sha1
(&tree1->oid);
+ diff_tree_commit_
oid
(&tree1->oid);
break;
case 2:
tree1 = opt->pending.objects[0].item;
break;
case 2:
tree1 = opt->pending.objects[0].item;