aboutsummaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-05 14:26:50 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-05 14:26:50 -0700
commit33f4d087a95a537095371a2fe02b96787518f389 (patch)
treef6b112a11c13afd300d624741055ddedb77ba193 /apply.c
parenta48e1d67e167507091f25dc00e2bd6c280fa538e (diff)
downloadgit-33f4d087a95a537095371a2fe02b96787518f389.tar.gz
git-apply: fix rename header parsing
It's not "rename from" and "rename to", it's "rename old" and "rename new". Which is illogical and doesn't match the "copy from/to" case, but that's life. Maybe Junio will fix it up one of these days.
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apply.c b/apply.c
index cf55fda71e..e02e760be2 100644
--- a/apply.c
+++ b/apply.c
@@ -435,8 +435,8 @@ static int parse_git_header(char *line, int len, unsigned int size, struct patch
{ "new file mode ", gitdiff_newfile },
{ "copy from ", gitdiff_copysrc },
{ "copy to ", gitdiff_copydst },
- { "rename from ", gitdiff_renamesrc },
- { "rename to ", gitdiff_renamedst },
+ { "rename old ", gitdiff_renamesrc },
+ { "rename new ", gitdiff_renamedst },
{ "similarity index ", gitdiff_similarity },
{ "dissimilarity index ", gitdiff_dissimilarity },
{ "", gitdiff_unrecognized },
@@ -569,7 +569,7 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
if (git_hdr_len < 0)
continue;
if (!patch->old_name && !patch->new_name)
- die("git diff header lacks filename information");
+ die("git diff header lacks filename information (line %d)", linenr);
*hdrsize = git_hdr_len;
return offset;
}