<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/grep.h, branch v2.20.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.20.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.20.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-11-05T04:42:11Z</updated>
<entry>
<title>grep: remove #ifdef NO_PTHREADS</title>
<updated>2018-11-05T04:42:11Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-03T08:48:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4002e87cb254298fa2f44b98ee1b618bda0e8b59'/>
<id>urn:sha1:4002e87cb254298fa2f44b98ee1b618bda0e8b59</id>
<content type='text'>
This is a faithful conversion without attempting to improve
anything. That comes later.

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>userdiff.c: remove implicit dependency on the_index</title>
<updated>2018-09-21T16:50:58Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-09-21T15:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=acd00ea04998ce469d1775c658134b097e18f5a3'/>
<id>urn:sha1:acd00ea04998ce469d1775c658134b097e18f5a3</id>
<content type='text'>
[jc: squashed in missing forward decl in userdiff.h found by Ramsay]

Helped-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&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.c: remove implicit dependency on the_index</title>
<updated>2018-09-21T16:48:10Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-09-21T15:57:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=38bbc2ea39372ce1b7eb494b31948f4a8a903f88'/>
<id>urn:sha1:38bbc2ea39372ce1b7eb494b31948f4a8a903f88</id>
<content type='text'>
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>Merge branch 'tb/grep-only-matching'</title>
<updated>2018-08-02T22:30:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-02T22:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87ece7ce1133ebc5d339cad5f6f92c02e5fc712d'/>
<id>urn:sha1:87ece7ce1133ebc5d339cad5f6f92c02e5fc712d</id>
<content type='text'>
"git grep" learned the "--only-matching" option.

* tb/grep-only-matching:
  grep.c: teach 'git grep --only-matching'
  grep.c: extract show_line_header()
</content>
</entry>
<entry>
<title>Merge branch 'tb/grep-column'</title>
<updated>2018-07-18T19:20:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-07-18T19:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d036d667b7f297f8305ffaaec212a95da7022ebe'/>
<id>urn:sha1:d036d667b7f297f8305ffaaec212a95da7022ebe</id>
<content type='text'>
"git grep" learned the "--column" option that gives not just the
line number but the column number of the hit.

* tb/grep-column:
  contrib/git-jump/git-jump: jump to exact location
  grep.c: add configuration variables to show matched option
  builtin/grep.c: add '--column' option to 'git-grep(1)'
  grep.c: display column number of first match
  grep.[ch]: extend grep_opt to allow showing matched column
  grep.c: expose {,inverted} match column in match_line()
  Documentation/config.txt: camel-case lineNumber for consistency
</content>
</entry>
<entry>
<title>grep.c: teach 'git grep --only-matching'</title>
<updated>2018-07-09T21:15:28Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2018-07-09T20:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d8db06eb4a5d5577db559a0059a377914c1ce5a'/>
<id>urn:sha1:9d8db06eb4a5d5577db559a0059a377914c1ce5a</id>
<content type='text'>
Teach 'git grep --only-matching', a new option to only print the
matching part(s) of a line.

For instance, a line containing the following (taken from README.md:27):

  (`man gitcvs-migration` or `git help cvs-migration` if git is

Is printed as follows:

  $ git grep --line-number --column --only-matching -e git -- \
    README.md | grep ":27"
  README.md:27:7:git
  README.md:27:16:git
  README.md:27:38:git

The patch works mostly as one would expect, with the exception of a few
considerations that are worth mentioning here.

Like GNU grep, this patch ignores --only-matching when --invert (-v) is
given. There is a sensible answer here, but parity with the behavior of
other tools is preferred.

Because a line might contain more than one match, there are special
considerations pertaining to when to print line headers, newlines, and
how to increment the match column offset. The line header and newlines
are handled as a special case within the main loop to avoid polluting
the surrounding code with conditionals that have large blocks.

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep.[ch]: extend grep_opt to allow showing matched column</title>
<updated>2018-06-22T19:59:02Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2018-06-22T15:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=017c0fcfdb21dd44e2c83f533e9a6d78513e7d8c'/>
<id>urn:sha1:017c0fcfdb21dd44e2c83f533e9a6d78513e7d8c</id>
<content type='text'>
To support showing the matched column when calling 'git-grep(1)', teach
'grep_opt' the normal set of options to configure the default behavior
and colorization of this feature.

Now that we have opt-&gt;columnnum, use it to disable short-circuiting over
ORs and ANDs so that col and icol are always filled with the earliest
matches on each line. In addition, don't return the first match from
match_line(), for the same reason.

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>grep: keep all colors in an array</title>
<updated>2018-05-29T05:51:28Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-26T13:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa151dc54dcf7ff32727d5b6fdf78093185ff1cc'/>
<id>urn:sha1:fa151dc54dcf7ff32727d5b6fdf78093185ff1cc</id>
<content type='text'>
This is more inline with how we handle color slots in other code. It
also allows us to get the list of configurable color slots later.

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>Merge branch 'ab/pcre-v2'</title>
<updated>2017-11-15T03:14:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-15T03:14:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2620b47794e3238ee5c7dd6b8a38f58732ace3a2'/>
<id>urn:sha1:2620b47794e3238ee5c7dd6b8a38f58732ace3a2</id>
<content type='text'>
Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed.

* ab/pcre-v2:
  grep: fix NO_LIBPCRE1_JIT to fully disable JIT
</content>
</entry>
<entry>
<title>grep: fix NO_LIBPCRE1_JIT to fully disable JIT</title>
<updated>2017-11-13T03:49:53Z</updated>
<author>
<name>Charles Bailey</name>
<email>cbailey32@bloomberg.net</email>
</author>
<published>2017-11-12T16:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2fff1e196d9cf03a868e99da39ea21b7c18c65c5'/>
<id>urn:sha1:2fff1e196d9cf03a868e99da39ea21b7c18c65c5</id>
<content type='text'>
If you have a pcre1 library which is compiled with JIT enabled then
PCRE_STUDY_JIT_COMPILE will be defined whether or not the
NO_LIBPCRE1_JIT configuration is set.

This means that we enable JIT functionality when calling pcre_study
even if NO_LIBPCRE1_JIT has been explicitly set and we just use plain
pcre_exec later.

Fix this by using own macro (GIT_PCRE_STUDY_JIT_COMPILE) which we set to
PCRE_STUDY_JIT_COMPILE only if NO_LIBPCRE1_JIT is not set and define to
0 otherwise, as before.

Reviewed-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
