Skip to content

Commit 6bdb460

Browse files
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 <johannes.schindelin@gmx.de>
2 parents 21b7b52 + d09d2e8 commit 6bdb460

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

grep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,8 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle
16471647

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

0 commit comments

Comments
 (0)