<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-pickaxe.c, branch v2.3.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.8</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-24T22:13:17Z</updated>
<entry>
<title>pickaxe: simplify kwset loop in contains()</title>
<updated>2014-03-24T22:13:17Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-03-22T17:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4aab50475c1d384e016c6ac6548635f1ddcd3fe'/>
<id>urn:sha1:e4aab50475c1d384e016c6ac6548635f1ddcd3fe</id>
<content type='text'>
Inlining the variable "found" actually makes the code shorter and
easier to read.

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>pickaxe: call strlen only when necessary in diffcore_pickaxe_count()</title>
<updated>2014-03-24T22:13:17Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-03-22T17:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=542b2aa2c9afba71febb248edb3083ff9cacf065'/>
<id>urn:sha1:542b2aa2c9afba71febb248edb3083ff9cacf065</id>
<content type='text'>
We need to determine the search term's length only when fixed-string
matching is used; regular expression compilation takes a NUL-terminated
string directly.  Only call strlen() in the former case.

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>pickaxe: move pickaxe() after pickaxe_match()</title>
<updated>2014-03-24T22:13:10Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-03-22T17:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3753bd1f69d3b17e0369390fb8960ae3b7855b70'/>
<id>urn:sha1:3753bd1f69d3b17e0369390fb8960ae3b7855b70</id>
<content type='text'>
pickaxe() calls pickaxe_match(); moving the definition of the former
after the latter allows us to do without an explicit function
declaration.

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>pickaxe: merge diffcore_pickaxe_grep() and diffcore_pickaxe_count() into diffcore_pickaxe()</title>
<updated>2014-03-24T22:12:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-03-22T17:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63b52afaa88bf89c781fe11c6803ff1dcc47d424'/>
<id>urn:sha1:63b52afaa88bf89c781fe11c6803ff1dcc47d424</id>
<content type='text'>
diffcore_pickaxe_count() initializes the regular expression or kwset for
the search term, calls pickaxe() with the callback has_changes() and
cleans up afterwards.  diffcore_pickaxe_grep() does the same, only it
doesn't support kwset and uses the callback diff_grep() instead.  Merge
the two functions to form the new diffcore_pickaxe() and thus get rid of
the duplicate regex setup and cleanup code.

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>pickaxe: honor -i when used with -S and --pickaxe-regex</title>
<updated>2014-03-24T22:12:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-03-22T17:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=218c45a45c4e1c3b09a1b6b2bc6e6ed457e38a9f'/>
<id>urn:sha1:218c45a45c4e1c3b09a1b6b2bc6e6ed457e38a9f</id>
<content type='text'>
accccde4 (pickaxe: allow -i to search in patch case-insensitively)
allowed case-insenitive matching for -G and -S, but for the latter
only if fixed string matching is used.  Allow it for -S and regular
expression matching as well to make the support complete.

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>Merge branch 'rs/pickaxe-simplify'</title>
<updated>2013-07-12T19:04:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-07-12T19:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5a3897f94dc4a2a77f30eeaf39cf14468061d0d'/>
<id>urn:sha1:d5a3897f94dc4a2a77f30eeaf39cf14468061d0d</id>
<content type='text'>
* rs/pickaxe-simplify:
  diffcore-pickaxe: simplify has_changes and contains
</content>
</entry>
<entry>
<title>diffcore-pickaxe: simplify has_changes and contains</title>
<updated>2013-07-07T17:24:11Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2013-07-06T13:53:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bdb5b9f1fe964dc9ac4aa29b7b80b1e89ba84dc'/>
<id>urn:sha1:3bdb5b9f1fe964dc9ac4aa29b7b80b1e89ba84dc</id>
<content type='text'>
Halve the number of callsites of contains() to two using temporary
variables, simplifying the code.  While at it, get rid of the
diff_options parameter, which became unused with 8fa4b09f.

Signed-off-by: René Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-pickaxe: make error messages more consistent</title>
<updated>2013-06-03T17:50:22Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2013-05-31T12:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=276b22d333d4207928f6cfe3ab7c1898cd509b88'/>
<id>urn:sha1:276b22d333d4207928f6cfe3ab7c1898cd509b88</id>
<content type='text'>
Currently, diffcore-pickaxe reports two distinct errors for the same
user error:

    $ git log --pickaxe-regex -S'\1'
    fatal: invalid pickaxe regex: Invalid back reference

    $ git log -G'\1'
    fatal: invalid log-grep regex: Invalid back reference

This "log-grep" was only an internal name for the -G feature during
development, and invite confusion with "git log --grep=&lt;pattern&gt;".

Change the error messages to say "invalid regex".

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-pickaxe: unify code for log -S/-G</title>
<updated>2013-04-05T17:31:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-04-05T05:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61690bf4a1ad499a673995b92cd8ab51104a431c'/>
<id>urn:sha1:61690bf4a1ad499a673995b92cd8ab51104a431c</id>
<content type='text'>
The logic flow of has_changes() used for "log -S" and diff_grep()
used for "log -G" are essentially the same.  See if we have both
sides that could be different in any interesting way, slurp the
contents in core, possibly after applying textconv, inspect the
contents, clean-up and report the result.  The only difference
between the two is how "inspect" step works.

Unify this codeflow in a helper, pickaxe_match(), which takes a
callback function that implements the specific "inspect" step.

After removing the common scaffolding code from the existing
has_changes() and diff_grep(), they each becomes such a callback
function suitable for passing to pickaxe_match().

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-pickaxe: fix leaks in "log -S&lt;block&gt;" and "log -G&lt;pattern&gt;"</title>
<updated>2013-04-05T17:31:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-05T04:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88ff684dd54f2a4793387f7162357005a4777ff2'/>
<id>urn:sha1:88ff684dd54f2a4793387f7162357005a4777ff2</id>
<content type='text'>
The diff_grep() and has_changes() functions had early return
codepaths for unmerged filepairs, which simply returned 0.  When we
taught textconv filter to them, one was ignored and continued to
return early without freeing the result filtered by textconv, and
the other had a failed attempt to fix, which allowed the planned
return value 0 to be overwritten by a bogus call to contains().

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
