summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aeac668)
raw | patch | inline | side by side (parent: aeac668)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Fri, 17 Jun 2005 22:23:40 +0000 (15:23 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Fri, 17 Jun 2005 22:23:40 +0000 (15:23 -0700) |
Pure mode changes won't have the file-name in the extended header lines,
so make sure we pick it up from the default name from the "diff --git"
line.
so make sure we pick it up from the default name from the "diff --git"
line.
apply.c | patch | blob | history |
index c0cd1520db6ef1036678046fc5c8ada174155c49..7d9059ba94aaa4c7f3dc2c8059acb4aca2c3277b 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -570,8 +570,11 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
int git_hdr_len = parse_git_header(line, len, size, patch);
if (git_hdr_len <= len)
continue;
- if (!patch->old_name && !patch->new_name)
- die("git diff header lacks filename information (line %d)", linenr);
+ if (!patch->old_name && !patch->new_name) {
+ if (!patch->def_name)
+ die("git diff header lacks filename information (line %d)", linenr);
+ patch->old_name = patch->new_name = patch->def_name;
+ }
*hdrsize = git_hdr_len;
return offset;
}