<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/grep.c, branch v2.3.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-02-25T06:09:54Z</updated>
<entry>
<title>Merge branch 'jk/blame-commit-label' into maint</title>
<updated>2015-02-25T06:09:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-25T06:09:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=faf723a631aff822b4808c496c0970edb0ca2a99'/>
<id>urn:sha1:faf723a631aff822b4808c496c0970edb0ca2a99</id>
<content type='text'>
"git blame HEAD -- missing" failed to correctly say "HEAD" when it
tried to say "No such path 'missing' in HEAD".

* jk/blame-commit-label:
  blame.c: fix garbled error message
  use xstrdup_or_null to replace ternary conditionals
  builtin/commit.c: use xstrdup_or_null instead of envdup
  builtin/apply.c: use xstrdup_or_null instead of null_strdup
  git-compat-util: add xstrdup_or_null helper
</content>
</entry>
<entry>
<title>use xstrdup_or_null to replace ternary conditionals</title>
<updated>2015-01-13T18:05:48Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-01-13T01:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c53f0719b04e0b6328c2e175e3c5d2dc8a0c282'/>
<id>urn:sha1:8c53f0719b04e0b6328c2e175e3c5d2dc8a0c282</id>
<content type='text'>
This replaces "x ? xstrdup(x) : NULL" with xstrdup_or_null(x).
The change is fairly mechanical, with the exception of
resolve_refdup, which can eliminate a temporary variable.

There are still a few hits grepping for "?.*xstrdup", but
these are of slightly different forms and cannot be
converted (e.g., "x ? xstrdup(x-&gt;foo) : NULL").

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>Merge branch 'rs/grep-color-words'</title>
<updated>2014-10-31T18:49:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-31T18:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf1f639ea2cb54f5dee2f1fe3435d0072ede9abb'/>
<id>urn:sha1:bf1f639ea2cb54f5dee2f1fe3435d0072ede9abb</id>
<content type='text'>
Allow painting or not painting (partial) matches in context lines
when showing "grep -C&lt;num&gt;" output in color.

* rs/grep-color-words:
  grep: add color.grep.matchcontext and color.grep.matchselected
</content>
</entry>
<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>color_parse: do not mention variable name in error message</title>
<updated>2014-10-14T18:01:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-07T19:33:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f6c5a2968c103621adf6928a29e4895361eaa23b'/>
<id>urn:sha1:f6c5a2968c103621adf6928a29e4895361eaa23b</id>
<content type='text'>
Originally the color-parsing function was used only for
config variables. It made sense to pass the variable name so
that the die() message could be something like:

  $ git -c color.branch.plain=bogus branch
  fatal: bad color value 'bogus' for variable 'color.branch.plain'

These days we call it in other contexts, and the resulting
error messages are a little confusing:

  $ git log --pretty='%C(bogus)'
  fatal: bad color value 'bogus' for variable '--pretty format'

  $ git config --get-color foo.bar bogus
  fatal: bad color value 'bogus' for variable 'command line'

This patch teaches color_parse to complain only about the
value, and then return an error code. Config callers can
then propagate that up to the config parser, which mentions
the variable name. Other callers can provide a custom
message. After this patch these three cases now look like:

  $ git -c color.branch.plain=bogus branch
  error: invalid color value: bogus
  fatal: unable to parse 'color.branch.plain' from command-line config

  $ git log --pretty='%C(bogus)'
  error: invalid color value: bogus
  fatal: unable to parse --pretty format

  $ git config --get-color foo.bar bogus
  error: invalid color value: bogus
  fatal: unable to parse default color value

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>Merge branch 'as/grep-fullname-config'</title>
<updated>2014-06-03T19:06:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-03T19:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=52df9173fa9b409a96c02a62b06d2b19f4ff5d0f'/>
<id>urn:sha1:52df9173fa9b409a96c02a62b06d2b19f4ff5d0f</id>
<content type='text'>
Add a configuration variable to force --full-name to be default for
"git grep".

This may cause regressions on scripted users that do not expect
this new behaviour.

* as/grep-fullname-config:
  grep: add grep.fullName config variable
</content>
</entry>
<entry>
<title>grep: add grep.fullName config variable</title>
<updated>2014-03-20T19:38:00Z</updated>
<author>
<name>Andreas Schwab</name>
<email>schwab@linux-m68k.org</email>
</author>
<published>2014-03-17T19:16:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6453f7b34864c1a639cc367f576476ee3be1456f'/>
<id>urn:sha1:6453f7b34864c1a639cc367f576476ee3be1456f</id>
<content type='text'>
This configuration variable sets the default for the --full-name option.

Signed-off-by: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
