aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-27 01:33:52 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-27 01:33:52 -0800
commit4e4b55dd0f5b4644767265f7c16a8b370278ce56 (patch)
tree67412de0f549d86f89bf2c05f4c39487a817fb44 /builtin-apply.c
parentc260d790c85c07a5f50235f664c36725deedfb10 (diff)
parent63e50d492c658b4a0d616f57f8b43a7a9ba1bbcc (diff)
downloadgit-4e4b55dd0f5b4644767265f7c16a8b370278ce56.tar.gz
git-4e4b55dd0f5b4644767265f7c16a8b370278ce56.tar.xz
Merge branch 'maint'
* maint: git-apply: do not fix whitespaces on context lines. diff --cc: integer overflow given a 2GB-or-larger file mailinfo: do not get confused with logical lines that are too long.
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 2dde34186..b84d747e3 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1607,7 +1607,8 @@ static int apply_line(char *output, const char *patch, int plen)
int need_fix_leading_space = 0;
char *buf;
- if ((new_whitespace != strip_whitespace) || !whitespace_error) {
+ if ((new_whitespace != strip_whitespace) || !whitespace_error ||
+ *patch != '+') {
memcpy(output, patch + 1, plen);
return plen;
}