Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin-grep: -w fix
author
Junio C Hamano
<junkio@cox.net>
Wed, 10 May 2006 01:27:56 +0000
(18:27 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 10 May 2006 01:27:56 +0000
(18:27 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
c39c4f4
)
diff --git
a/builtin-grep.c
b/builtin-grep.c
index d290074af28e0eb84fac25011da67a5ddd02b798..52ac521afea67b3de2ee3c5f1fd196ba11f17c9a 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-241,10
+241,10
@@
static int grep_buffer(struct grep_opt *opt, const char *name,
die("regexp returned nonsense");
if (pmatch[0].rm_so != 0 &&
word_char(bol[pmatch[0].rm_so-1]))
- continue; /* not a word boundary */
- if (
(eol-bol) < pmatch[0].rm_eo
&&
+ hit = 0;
+ if (
pmatch[0].rm_eo != (eol-bol)
&&
word_char(bol[pmatch[0].rm_eo]))
- continue; /* not a word boundary */
+ hit = 0;
}
if (hit)
break;