summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-06-22 02:29:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 10:23:48 -0700
commit03b4538badb405b2f159531ad35873700d073bb8 (patch)
treece743c2887bb63c91a0fe6bcb64949815a594946 /apply.c
parentf5ab6ccae3063725e0a6bfacffaffb245d6df83c (diff)
downloadgit-03b4538badb405b2f159531ad35873700d073bb8.tar.gz
[PATCH] git-apply --stat: show new filename for rename/copy patch.
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>
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apply.c b/apply.c
index af97537522..53a9bb626e 100644
--- a/apply.c
+++ b/apply.c
@@ -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