X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-apply.c;h=e9d49f133afd559d2df3f09997c08a61dfc2ff86;hb=72130808173d3dfee85f2a29548fa9fec33a5351;hp=74f7e79241b1f8192ad00af39571ef59a796b8af;hpb=44c33a5b9603fba7c9556512a72e4e392ba4ae2d;p=git.git diff --git a/builtin-apply.c b/builtin-apply.c index 74f7e7924..e9d49f133 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -810,6 +810,13 @@ static int parse_git_header(char *line, int len, unsigned int size, struct patch * the default name from the header. */ patch->def_name = git_header_name(line, len); + if (patch->def_name && root) { + char *s = xmalloc(root_len + strlen(patch->def_name) + 1); + strcpy(s, root); + strcpy(s + root_len, patch->def_name); + free(patch->def_name); + patch->def_name = s; + } line += len; size -= len;