<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/grep.c, branch v1.8.0.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2012-11-19T03:32:30Z</updated>
<entry>
<title>Merge branch 'nd/grep-true-path' into maint</title>
<updated>2012-11-19T03:32:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-11-19T03:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=dca5ed5f5b2646186ce177bb41974035f8fefd52'/>
<id>urn:sha1:dca5ed5f5b2646186ce177bb41974035f8fefd52</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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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>
<entry>
<title>grep.c: make two symbols really file-scope static this time</title>
<updated>2012-09-20T21:20:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-20T21:20:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3083301ead459a45059af3ee85fb51d5d737a74d'/>
<id>urn:sha1:3083301ead459a45059af3ee85fb51d5d737a74d</id>
<content type='text'>
Adding a declaration at the beginning is not sufficient for obvious
reasons. The definition has to be made static.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep.c: mark private file-scope symbols as static</title>
<updated>2012-09-16T06:35:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-15T21:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=07a7d656dd550e24e8b9a1802665aa0abba435ee'/>
<id>urn:sha1:07a7d656dd550e24e8b9a1802665aa0abba435ee</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
