<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/grep.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-18T20:51:20Z</updated>
<entry>
<title>Merge branch 'rs/grep-h-c'</title>
<updated>2014-03-18T20:51:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-18T20:51:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f6be80ef15f09d7a5330a6cee03ab5fe3d12979'/>
<id>urn:sha1:6f6be80ef15f09d7a5330a6cee03ab5fe3d12979</id>
<content type='text'>
"git grep" learns to handle combination of "-h (no header)" and "-c
(counts)".

* rs/grep-h-c:
  grep: support -h (no header) with --count
  t7810: add missing variables to tests in loop
</content>
</entry>
<entry>
<title>grep: support -h (no header) with --count</title>
<updated>2014-03-11T22:05:28Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-03-11T21:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f76d947ae13ca66790a305a58764ae50ea7442d9'/>
<id>urn:sha1:f76d947ae13ca66790a305a58764ae50ea7442d9</id>
<content type='text'>
Suppress printing the header (filename) with -h even if in -c/--count
mode.  GNU grep and OpenBSD's grep do the same.

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>Use hashcpy() when copying object names</title>
<updated>2014-03-06T22:03:12Z</updated>
<author>
<name>Sun He</name>
<email>sunheehnus@gmail.com</email>
</author>
<published>2014-03-03T09:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50546b15ed1df25837f8b291e6fa5bbcdb84635e'/>
<id>urn:sha1:50546b15ed1df25837f8b291e6fa5bbcdb84635e</id>
<content type='text'>
We invented hashcpy() to keep the abstraction of "object name"
behind it.  Use it instead of calling memcpy() with hard-coded
20-byte length when moving object names between pieces of memory.

Leave ppc/sha1.c as-is, because the function is about the SHA-1 hash
algorithm whose output is and will always be 20 bytes.

Helped-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Helped-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Signed-off-by: Sun He &lt;sunheehnus@gmail.com&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>revisions: initialize revs-&gt;grep_filter using grep_init()</title>
<updated>2012-10-10T06:21:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-09T23:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=918d4e1c907983d26b0c4d82d7f7abff4dbec4e5'/>
<id>urn:sha1:918d4e1c907983d26b0c4d82d7f7abff4dbec4e5</id>
<content type='text'>
Instead of using the hand-rolled initialization sequence,
use grep_init() to populate the necessary bits.  This opens
the door to allow the calling commands to optionally read
grep.* configuration variables via git_config() if they
want to.

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>
</feed>
