summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-29 14:59:50 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-29 14:59:50 -0700
commit8e105e3928fccb8038a542ee7fb5986b7ec48eb9 (patch)
tree8e59fc51dd20002b7c3759d5eab7cd40fba87a0d /grep.c
parent3be7e06713462110f0ff15f54f864b5ecf646814 (diff)
parentdbb6a4ada6c6c1065b62313127ff032196e9d232 (diff)
Merge branch 'rs/maint-grep-word-regexp-fix'
* rs/maint-grep-word-regexp-fix: grep: fix word-regexp at the beginning of lines
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/grep.c b/grep.c
index a649f063cf..cc6d5b04c1 100644
--- a/grep.c
+++ b/grep.c
@@ -360,6 +360,7 @@ static int match_one_pattern(struct grep_pat *p, char *bol, char *eol,
bol = pmatch[0].rm_so + bol + 1;
while (word_char(bol[-1]) && bol < eol)
bol++;
+ eflags |= REG_NOTBOL;
if (bol < eol)
goto again;
}