Skip to content

Commit 9858c7b

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge branch 'fixes-from-the-git-mailing-list'
These fixes have been sent to the Git mailing list but have not been picked up by the Git project yet. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents d200f13 + 1306dfc commit 9858c7b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

grep.c

+2
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,8 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle
16461646

16471647
bol = gs->buf;
16481648
left = gs->size;
1649+
if (left && gs->buf[left-1] == '\n')
1650+
left--;
16491651
while (left) {
16501652
const char *eol;
16511653
int hit;

0 commit comments

Comments
 (0)