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:
authorThomas Rast <trast@student.ethz.ch>2008-07-04 23:10:14 +0400
committerJunio C Hamano <gitster@pobox.com>2008-07-05 11:37:44 +0400
commit6cf91492d9cd985e1fa65181d99d6d578d4439dc (patch)
tree167f08ae051d73ec55e1add3b85efa6fd370fe60 /builtin-apply.c
parent7dde4bb3674da53dd9e33c741bea3fe680690a0d (diff)
Fix apply --recount handling of no-EOL line
If a patch modifies the last line of a file that previously had no terminating '\n', it looks like -old text \ No newline at end of file +new text Hence, a '\' line does not signal the end of the hunk. This modifies 'git apply --recount' to take this into account. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 9fcfe3955d..c0f867daed 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -919,7 +919,7 @@ static void recount_diff(char *line, int size, struct fragment *fragment)
newlines++;
continue;
case '\\':
- break;
+ continue;
case '@':
ret = size < 3 || prefixcmp(line, "@@ ");
break;