Skip to content

Commit

Permalink
[PATCH] git-apply --stat: show new filename for rename/copy patch.
Browse files Browse the repository at this point in the history
When a patch is a git extended rename/copy patch, "git-apply
--stat" showed the old filename.  Change it to show the new
filename, because most of the time we are interested in looking
at the resulting tree.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Junio C Hamano authored and Linus Torvalds committed Jun 22, 2005
1 parent f5ab6cc commit 03b4538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,11 +723,11 @@ const char minuses[]= "---------------------------------------------------------

static void show_stats(struct patch *patch)
{
char *name = patch->old_name;
char *name = patch->new_name;
int len, max, add, del, total;

if (!name)
name = patch->new_name;
name = patch->old_name;

/*
* "scale" the filename
Expand Down

0 comments on commit 03b4538

Please sign in to comment.