Skip to content

Commit 9831b37

Browse files
committed
Merge branch 'maint' to sync with 1.6.3.2
2 parents 2414b45 + 6c7f58d commit 9831b37

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Documentation/RelNotes-1.6.3.2.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ Fixes since v1.6.3.1
3737
the first hunk that adds a line at the top was split into two and
3838
both halves are marked to be used.
3939

40+
* "git blame path" misbehaved at the commit where path became file
41+
from a directory with some files in it.
42+
4043
* "git for-each-ref" had a segfaulting bug when dealing with a tag object
4144
created by an ancient git.
4245

4346
* "git format-patch -k" still added patch numbers if format.numbered
4447
configuration was set.
4548

46-
* "git grep --color ''" did not terminate.
49+
* "git grep --color ''" did not terminate. The command also had
50+
subtle bugs with its -w option.
4751

4852
* http-push had a small use-after-free bug.
4953

@@ -55,9 +59,3 @@ Fixes since v1.6.3.1
5559

5660
Many other general usability updates around help text, diagnostic messages
5761
and documentation are included as well.
58-
59-
---
60-
exec >/var/tmp/1
61-
O=v1.6.3.1-68-g456cb4c
62-
echo O=$(git describe maint)
63-
git shortlog --no-merges $O..maint

grep.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static int match_one_pattern(struct grep_pat *p, char *bol, char *eol,
331331

332332
if (hit && p->word_regexp) {
333333
if ((pmatch[0].rm_so < 0) ||
334-
(eol - bol) <= pmatch[0].rm_so ||
334+
(eol - bol) < pmatch[0].rm_so ||
335335
(pmatch[0].rm_eo < 0) ||
336336
(eol - bol) < pmatch[0].rm_eo)
337337
die("regexp returned nonsense");
@@ -350,6 +350,10 @@ static int match_one_pattern(struct grep_pat *p, char *bol, char *eol,
350350
else
351351
hit = 0;
352352

353+
/* Words consist of at least one character. */
354+
if (pmatch->rm_so == pmatch->rm_eo)
355+
hit = 0;
356+
353357
if (!hit && pmatch[0].rm_so + bol + 1 < eol) {
354358
/* There could be more than one match on the
355359
* line, and the first match might not be

0 commit comments

Comments
 (0)