aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-08 22:37:41 -0700
committerJunio C Hamano <gitster@pobox.com>2010-05-08 22:37:41 -0700
commitb7511571e3ecd6b81a47e42a52cf9b5160a3d6e9 (patch)
tree56c67e4fdf0f4e30433939d3443543bc9c93851f /builtin
parentdaa81c4a4a48a76e542293c025972e6a870fec9b (diff)
parent0c3ef984fa2d4a42be787e168cfb189d15b00919 (diff)
downloadgit-b7511571e3ecd6b81a47e42a52cf9b5160a3d6e9.tar.gz
git-b7511571e3ecd6b81a47e42a52cf9b5160a3d6e9.tar.xz
Merge branch 'bg/apply-blank-trailing-context'
* bg/apply-blank-trailing-context: apply: Allow blank *trailing* context lines to match beyond EOF
Diffstat (limited to 'builtin')
-rw-r--r--builtin/apply.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index d56cabf5e..8fc5ec31d 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1866,13 +1866,13 @@ static int match_fragment(struct image *img,
if (match_end && (preimage->nr + try_lno != img->nr))
return 0;
} else if (ws_error_action == correct_ws_error &&
- (ws_rule & WS_BLANK_AT_EOF) && match_end) {
+ (ws_rule & WS_BLANK_AT_EOF)) {
/*
- * This hunk that matches at the end extends beyond
- * the end of img, and we are removing blank lines
- * at the end of the file. This many lines from the
- * beginning of the preimage must match with img, and
- * the remainder of the preimage must be blank.
+ * This hunk extends beyond the end of img, and we are
+ * removing blank lines at the end of the file. This
+ * many lines from the beginning of the preimage must
+ * match with img, and the remainder of the preimage
+ * must be blank.
*/
preimage_limit = img->nr - try_lno;
} else {