summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-06-22 02:29:16 -0700
committerLibravatar Linus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 10:23:48 -0700
commit03b4538badb405b2f159531ad35873700d073bb8 (patch)
treece743c2887bb63c91a0fe6bcb64949815a594946
parent[PATCH] local-pull: implement fetch_ref() (diff)
downloadtgif-03b4538badb405b2f159531ad35873700d073bb8.tar.xz
[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>
-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