summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-15 17:36:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-15 17:36:14 (GMT)
commit90360c710c4105e3bce74fc2d746c4fa48bf07e7 (patch)
tree24fd9f59b7c7eab53cb7c0f493272cb598de2724 /builtin/apply.c
parent29b2f0565a1e3fdd6ef40d6e12e211757071ef56 (diff)
parent212eb96a96e256933a76e48d85fa4f500bed0dee (diff)
downloadgit-90360c710c4105e3bce74fc2d746c4fa48bf07e7.zip
git-90360c710c4105e3bce74fc2d746c4fa48bf07e7.tar.gz
git-90360c710c4105e3bce74fc2d746c4fa48bf07e7.tar.bz2
Merge branch 'tr/maint-apply-non-git-patch-parsefix' into maint
"git apply" parsed patches that add new files, generated by programs other than Git, incorrectly. This is an old breakage in v1.7.11. * tr/maint-apply-non-git-patch-parsefix: apply: carefully strdup a possibly-NULL name
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 30eefc3..3979f8b 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -906,7 +906,7 @@ static void parse_traditional_patch(const char *first, const char *second, struc
patch->old_name = name;
} else {
patch->old_name = name;
- patch->new_name = xstrdup(name);
+ patch->new_name = null_strdup(name);
}
}
if (!name)