author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 23 May 2009 11:45:26 +0000 (13:45 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 23 May 2009 23:29:05 +0000 (16:29 -0700) | ||
commit | dbb6a4ada6c6c1065b62313127ff032196e9d232 | |
tree | 27c336e0e4c02aa1427379360e2d845ca727c72a | tree | snapshot |
parent | e701fadb9e0e51a6811690d95a53bd1f5b6fad86 | commit | diff |
grep: fix word-regexp at the beginning of lines
After bol is forwarded, it doesn't represent the beginning of the line
any more. This means that the beginning-of-line marker (^) mustn't match,
i.e. the regex flag REG_NOTBOL needs to be set.
This bug was introduced by fb62eb7fab97cea880ea7fe4f341a4dfad14ab48
("grep -w: forward to next possible position after rejected match").
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
After bol is forwarded, it doesn't represent the beginning of the line
any more. This means that the beginning-of-line marker (^) mustn't match,
i.e. the regex flag REG_NOTBOL needs to be set.
This bug was introduced by fb62eb7fab97cea880ea7fe4f341a4dfad14ab48
("grep -w: forward to next possible position after rejected match").
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c | diff | blob | history | |
t/t7002-grep.sh | diff | blob | history |