summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-06-22 09:29:16 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 17:23:48 (GMT)
commit03b4538badb405b2f159531ad35873700d073bb8 (patch)
treece743c2887bb63c91a0fe6bcb64949815a594946
parentf5ab6ccae3063725e0a6bfacffaffb245d6df83c (diff)
downloadgit-03b4538badb405b2f159531ad35873700d073bb8.zip
git-03b4538badb405b2f159531ad35873700d073bb8.tar.gz
git-03b4538badb405b2f159531ad35873700d073bb8.tar.bz2
[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 af97537..53a9bb6 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