mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
diff.c: readability fix
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>
This commit is contained in:
parent
2cfb6cec94
commit
f2d2a5def0
4
diff.c
4
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);
|
||||
|
Loading…
Reference in New Issue
Block a user