Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apply.c b/apply.c
index c0cd1520db..7d9059ba94 100644
--- 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;
}