Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff.c: readability fix
author
Stefan Beller
<sbeller@google.com>
Fri, 30 Jun 2017 00:06:46 +0000
(17:06 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 30 Jun 2017 20:13:01 +0000
(13:13 -0700)
We already have dereferenced 'p->two' into a local variable 'two'.
Use that.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
2cfb6ce
)
diff --git
a/diff.c
b/diff.c
index 00b4c86698e6badb5d2904cacb3ba7d92c018d76..2874dfc6fc85aebf876217078e84bed8c6db488b 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-3282,8
+3282,8
@@
static void run_diff(struct diff_filepair *p, struct diff_options *o)
const char *other;
const char *attr_path;
- name =
p->
one->path;
- other = (strcmp(name,
p->two->path) ? p->
two->path : NULL);
+ name = one->path;
+ other = (strcmp(name,
two->path) ?
two->path : NULL);
attr_path = name;
if (o->prefix_length)
strip_prefix(o->prefix_length, &name, &other);