<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/grep.c, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-04-28T07:46:39Z</updated>
<entry>
<title>Merge branch 'maint'</title>
<updated>2009-04-28T07:46:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-04-28T07:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b79376cdf3bd6ee922261776613d085a7b36ffd9'/>
<id>urn:sha1:b79376cdf3bd6ee922261776613d085a7b36ffd9</id>
<content type='text'>
* maint:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.6.1' into maint</title>
<updated>2009-04-28T07:46:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-04-28T07:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2254da06a5473ffde973337bad2c6a96eea61e20'/>
<id>urn:sha1:2254da06a5473ffde973337bad2c6a96eea61e20</id>
<content type='text'>
* maint-1.6.1:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.6.0' into maint-1.6.1</title>
<updated>2009-04-28T07:46:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-04-28T07:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e73cb2f48cc4044905455a9936692f967a0f9b3'/>
<id>urn:sha1:3e73cb2f48cc4044905455a9936692f967a0f9b3</id>
<content type='text'>
* maint-1.6.0:
  grep: fix segfault when "git grep '('" is given
  Documentation: fix a grammatical error in api-builtin.txt
  builtin-merge: fix a typo in an error message
</content>
</entry>
<entry>
<title>grep: fix segfault when "git grep '('" is given</title>
<updated>2009-04-28T00:28:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-04-27T18:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c922b01f54c4bebe84daeacf014cfbc8dc68479b'/>
<id>urn:sha1:c922b01f54c4bebe84daeacf014cfbc8dc68479b</id>
<content type='text'>
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git log: avoid segfault with --all-match</title>
<updated>2009-03-19T02:10:40Z</updated>
<author>
<name>Michele Ballabio</name>
<email>barra_cuda@katamail.com</email>
</author>
<published>2009-03-18T20:53:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba150a3fdce48e4b973db6e153e6b3ffb28a0cea'/>
<id>urn:sha1:ba150a3fdce48e4b973db6e153e6b3ffb28a0cea</id>
<content type='text'>
Avoid a segfault when the command

	git log --all-match

was issued, by ignoring the option.

Signed-off-by: Michele Ballabio &lt;barra_cuda@katamail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: cast printf %.*s "precision" argument explicitly to int</title>
<updated>2009-03-09T01:22:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-03-09T01:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=747a322bcc4df5f9a371890ffe728741456704c7'/>
<id>urn:sha1:747a322bcc4df5f9a371890ffe728741456704c7</id>
<content type='text'>
On some systems, regoff_t that is the type of rm_so/rm_eo members are
wider than int; %.*s precision specifier expects an int, so use an explicit
cast.

A breakage reported on Darwin by Brian Gernhardt should be fixed with
this patch.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: color patterns in output</title>
<updated>2009-03-07T19:34:59Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-07T12:32:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e8f59d577e5615ceff06da0d9dde36a63608d53'/>
<id>urn:sha1:7e8f59d577e5615ceff06da0d9dde36a63608d53</id>
<content type='text'>
Coloring matches makes them easier to spot in the output.

Add two options and two parameters: color.grep (to turn coloring on
or off), color.grep.match (to set the color of matches), --color
and --no-color (to turn coloring on or off, respectively).

The output of external greps is not changed.

This patch is based on earlier ones by Nguyễn Thái Ngọc Duy and
Thiago Alves.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: add pmatch and eflags arguments to match_one_pattern()</title>
<updated>2009-03-07T19:34:57Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-07T12:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=79212772ce127cc32a67d50eaaa7f1c102ce7d5d'/>
<id>urn:sha1:79212772ce127cc32a67d50eaaa7f1c102ce7d5d</id>
<content type='text'>
Push pmatch and eflags to the callers of match_one_pattern(), which
allows them to specify regex execution flags and to get the location
of a match.

Since we only use the first element of the matches array and aren't
interested in submatches, no provision is made for callers to
provide a larger array.

eflags are ignored for fixed patterns, but that's OK, since they
only have a meaning in connection with regular expressions
containing ^ or $.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: remove grep_opt argument from match_expr_eval()</title>
<updated>2009-03-07T19:34:56Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-07T12:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d7eb527d731e2a71eaa4597417d879a15588d9ee'/>
<id>urn:sha1:d7eb527d731e2a71eaa4597417d879a15588d9ee</id>
<content type='text'>
The only use of the struct grep_opt argument of match_expr_eval()
is to pass the option word_regexp to match_one_pattern().  By adding
a pattern flag for it we can reduce the number of function arguments
of these two functions, as a cleanup and preparation for adding more
in the next patch.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: micro-optimize hit collection for AND nodes</title>
<updated>2009-03-07T19:34:53Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-07T12:27:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=252d560d215581637fcddd7a0a18f89204ecc8d1'/>
<id>urn:sha1:252d560d215581637fcddd7a0a18f89204ecc8d1</id>
<content type='text'>
In addition to returning if an expression matches a line,
match_expr_eval() updates the expression's hit flag if the parameter
collect_hits is set.  It never sets collect_hits for children of AND
nodes, though, so their hit flag will never be updated.  Because of
that we can return early if the first child didn't match, no matter
if collect_hits is set or not.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
