Skip to content

Commit

Permalink
Merge branch 'maint' to sync with 1.6.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Junio C Hamano committed Jun 4, 2009
2 parents 2414b45 + 6c7f58d commit 9831b37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 5 additions & 7 deletions Documentation/RelNotes-1.6.3.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ Fixes since v1.6.3.1
the first hunk that adds a line at the top was split into two and
both halves are marked to be used.

* "git blame path" misbehaved at the commit where path became file
from a directory with some files in it.

* "git for-each-ref" had a segfaulting bug when dealing with a tag object
created by an ancient git.

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

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

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

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

Many other general usability updates around help text, diagnostic messages
and documentation are included as well.

---
exec >/var/tmp/1
O=v1.6.3.1-68-g456cb4c
echo O=$(git describe maint)
git shortlog --no-merges $O..maint
6 changes: 5 additions & 1 deletion grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static int match_one_pattern(struct grep_pat *p, char *bol, char *eol,

if (hit && p->word_regexp) {
if ((pmatch[0].rm_so < 0) ||
(eol - bol) <= pmatch[0].rm_so ||
(eol - bol) < pmatch[0].rm_so ||
(pmatch[0].rm_eo < 0) ||
(eol - bol) < pmatch[0].rm_eo)
die("regexp returned nonsense");
Expand All @@ -350,6 +350,10 @@ static int match_one_pattern(struct grep_pat *p, char *bol, char *eol,
else
hit = 0;

/* Words consist of at least one character. */
if (pmatch->rm_so == pmatch->rm_eo)
hit = 0;

if (!hit && pmatch[0].rm_so + bol + 1 < eol) {
/* There could be more than one match on the
* line, and the first match might not be
Expand Down

0 comments on commit 9831b37

Please sign in to comment.