<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/grep.h, branch v2.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-10-28T17:33:50Z</updated>
<entry>
<title>grep: add color.grep.matchcontext and color.grep.matchselected</title>
<updated>2014-10-28T17:33:50Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-10-27T18:23:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=79a77109d3d0d364910ff7fa8c605c554dc4c3e0'/>
<id>urn:sha1:79a77109d3d0d364910ff7fa8c605c554dc4c3e0</id>
<content type='text'>
The config option color.grep.match can be used to specify the highlighting
color for matching strings.  Add the options matchContext and matchSelected
to allow different colors to be specified for matching strings in the
context vs. in selected lines.  This is similar to the ms and mc specifiers
in GNU grep's environment variable GREP_COLORS.

Tests are from Zoltan Klinger's earlier attempt to solve the same
issue in a different way.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: allow to use textconv filters</title>
<updated>2013-05-10T17:27:31Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-05-10T15:10:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=335ec3bf411ae6606b58885deb281192c86651c6'/>
<id>urn:sha1:335ec3bf411ae6606b58885deb281192c86651c6</id>
<content type='text'>
Recently and not so recently, we made sure that log/grep type operations
use textconv filters when a userfacing diff would do the same:

ef90ab6 (pickaxe: use textconv for -S counting, 2012-10-28)
b1c2f57 (diff_grep: use textconv buffers for add/deleted files, 2012-10-28)
0508fe5 (combine-diff: respect textconv attributes, 2011-05-23)

"git grep" currently does not use textconv filters at all, that is
neither for displaying the match and context nor for the actual grepping,
even when requested by --textconv.

Introduce an option "--textconv" which makes git grep use any configured
textconv filters for grepping and output purposes. It is off by default.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fix clang -Wtautological-compare with unsigned enum</title>
<updated>2013-02-25T15:35:55Z</updated>
<author>
<name>Antoine Pelisse</name>
<email>apelisse@gmail.com</email>
</author>
<published>2013-02-03T14:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ce3ffb840a1dfa7fcbafa9309fab37478605d08'/>
<id>urn:sha1:3ce3ffb840a1dfa7fcbafa9309fab37478605d08</id>
<content type='text'>
Create a GREP_HEADER_FIELD_MIN so we can check that the field value is
sane and silence the clang warning.

Clang warning happens because the enum is unsigned (this is
implementation-defined, and there is no negative fields) and the check
is then tautological.

Signed-off-by: Antoine Pelisse &lt;apelisse@gmail.com&gt;
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/grep-true-path'</title>
<updated>2012-10-29T08:13:16Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-10-29T08:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e034d1bb927c17a3406a2bdbb8ccf710677a139d'/>
<id>urn:sha1:e034d1bb927c17a3406a2bdbb8ccf710677a139d</id>
<content type='text'>
"git grep -e pattern &lt;tree&gt;" asked the attribute system to read
"&lt;tree&gt;:.gitattributes" file in the working tree, which was
nonsense.

* nd/grep-true-path:
  grep: stop looking at random places for .gitattributes
</content>
</entry>
<entry>
<title>grep: stop looking at random places for .gitattributes</title>
<updated>2012-10-12T15:24:44Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-10-12T10:49:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55c61688ea1e41f4a8c26f957bf1bc43cd39ed97'/>
<id>urn:sha1:55c61688ea1e41f4a8c26f957bf1bc43cd39ed97</id>
<content type='text'>
grep searches for .gitattributes using "name" field in struct
grep_source but that field is not real on-disk path name. For example,
"grep pattern rev" fills the field with "rev:path", and Git looks for
.gitattributes in the (non-existent but exploitable) path "rev:path"
instead of "path".

This patch passes real paths down to grep_source_load_driver() when:

 - grep on work tree
 - grep on the index
 - grep a commit (or a tag if it points to a commit)

so that these cases look up .gitattributes at proper paths.
.gitattributes lookup is disabled in all other cases.

Initial-work-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: move pattern-type bits support to top-level grep.[ch]</title>
<updated>2012-10-10T06:21:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-03T21:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5c31d3381d11903c01d51aff4437fe9f76d0268'/>
<id>urn:sha1:c5c31d3381d11903c01d51aff4437fe9f76d0268</id>
<content type='text'>
Switching between -E/-G/-P/-F correctly needs a lot more than just
flipping opt-&gt;regflags bit these days, and we have a nice helper
function buried in builtin/grep.c for the sole use of "git grep".

Extract it so that "log --grep" family can also use it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: move the configuration parsing logic to grep.[ch]</title>
<updated>2012-10-09T23:17:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-09T23:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7687a0541e0a6d86c5005d84057321368181c1b5'/>
<id>urn:sha1:7687a0541e0a6d86c5005d84057321368181c1b5</id>
<content type='text'>
The configuration handling is a library-ish part of this program,
that is not specific to "git grep" command.  It should be reusable
by "log" and others.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>log --grep-reflog: reject the option without -g</title>
<updated>2012-09-29T19:07:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-29T18:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=baa6378ff2106738c74213280904507d0ed8129c'/>
<id>urn:sha1:baa6378ff2106738c74213280904507d0ed8129c</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>revision: add --grep-reflog to filter commits by reflog messages</title>
<updated>2012-09-29T18:41:14Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-09-29T04:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72fd13f71c18b438ca3e482c126bcbcaa2dac650'/>
<id>urn:sha1:72fd13f71c18b438ca3e482c126bcbcaa2dac650</id>
<content type='text'>
Similar to --author/--committer which filters commits by author and
committer header fields. --grep-reflog adds a fake "reflog" header to
commit and a grep filter to search on that line.

All rules to --author/--committer apply except no timestamp stripping.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: prepare for new header field filter</title>
<updated>2012-09-29T18:40:58Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-09-29T04:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad4813b3c2513c5dc7e84305ab8a393b32124977'/>
<id>urn:sha1:ad4813b3c2513c5dc7e84305ab8a393b32124977</id>
<content type='text'>
grep supports only author and committer headers, which have the same
special treatment that later headers may or may not have. Check for
field type and only strip_timestamp() when the field is either author
or committer.

GREP_HEADER_FIELD_MAX is put in the grep_header_field enum to be
calculated automatically, correctly, as long as it's at the end of the
enum.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
