<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pretty.c, branch v2.43.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.43.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.43.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-10-09T18:25:13Z</updated>
<entry>
<title>pretty: fix ref filtering for %(decorate) formats</title>
<updated>2023-10-09T18:25:13Z</updated>
<author>
<name>Andy Koppe</name>
<email>andy.koppe@gmail.com</email>
</author>
<published>2023-10-08T20:23:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b09d16abac5c0cf389098a58f113f2053357dee'/>
<id>urn:sha1:2b09d16abac5c0cf389098a58f113f2053357dee</id>
<content type='text'>
Mark pretty formats containing "%(decorate" as requiring decoration in
userformat_find_requirements(), same as "%d" and "%D".

Without this, cmd_log_init_finish() didn't invoke load_ref_decorations()
with the decoration_filter it puts together, and hence filtering options
such as --decorate-refs were quietly ignored.

Amend one of the %(decorate) checks in t4205-log-pretty-formats.sh to
test this.

Signed-off-by: Andy Koppe &lt;andy.koppe@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: add pointer and tag options to %(decorate)</title>
<updated>2023-08-21T18:40:10Z</updated>
<author>
<name>Andy Koppe</name>
<email>andy.koppe@gmail.com</email>
</author>
<published>2023-08-20T18:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f1f8a258567268974b9bbd012c33ad219a31aa0e'/>
<id>urn:sha1:f1f8a258567268974b9bbd012c33ad219a31aa0e</id>
<content type='text'>
Add pointer and tag options to %(decorate) format, to allow to override
the " -&gt; " string used to show where HEAD points and the "tag: " string
used to mark tags.

Document in pretty-formats.txt and test in t4205-log-pretty-formats.sh.

Signed-off-by: Andy Koppe &lt;andy.koppe@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: add %(decorate[:&lt;options&gt;]) format</title>
<updated>2023-08-21T18:40:09Z</updated>
<author>
<name>Andy Koppe</name>
<email>andy.koppe@gmail.com</email>
</author>
<published>2023-08-20T18:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a58dd835e9536cf9e7adcd404d008a44d29af804'/>
<id>urn:sha1:a58dd835e9536cf9e7adcd404d008a44d29af804</id>
<content type='text'>
Add %(decorate[:&lt;options&gt;]) format that lists ref names similarly to the
%d format, but which allows the otherwise fixed prefix, suffix and
separator strings to be customized. Omitted options default to the
strings used in %d.

Rename expand_separator() function used to expand %x literal formatting
codes to expand_string_arg(), as it is now used on strings other than
separators.

Examples:
- %(decorate) is equivalent to %d.
- %(decorate:prefix=,suffix=) is equivalent to %D.
- %(decorate:prefix=[,suffix=],separator=%x3B) produces a list enclosed
in square brackets and separated by semicolons.

Test the format in t4205-log-pretty-formats.sh and document it in
pretty-formats.txt.

Signed-off-by: Andy Koppe &lt;andy.koppe@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>decorate: refactor format_decorations()</title>
<updated>2023-08-21T18:40:09Z</updated>
<author>
<name>Andy Koppe</name>
<email>andy.koppe@gmail.com</email>
</author>
<published>2023-08-20T18:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3883a6532163f0a53a7b202f32bf8fe565af056'/>
<id>urn:sha1:a3883a6532163f0a53a7b202f32bf8fe565af056</id>
<content type='text'>
Rename the format_decorations_extended function to format_decorations
and drop the format_decorations wrapper macro. Pass the prefix, suffix
and separator strings as a single 'struct format_decorations' pointer
argument instead of separate arguments. Use default values defined in
the function when either the struct pointer or any of the struct fields
are NULL. This is to ease extension with additional options.

Signed-off-by: Andy Koppe &lt;andy.koppe@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cw/compat-util-header-cleanup'</title>
<updated>2023-07-17T18:30:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-17T18:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce481ac8b31c9061eeecd1ba0d7174b621f96632'/>
<id>urn:sha1:ce481ac8b31c9061eeecd1ba0d7174b621f96632</id>
<content type='text'>
Further shuffling of declarations across header files to streamline
file dependencies.

* cw/compat-util-header-cleanup:
  git-compat-util: move alloc macros to git-compat-util.h
  treewide: remove unnecessary includes for wrapper.h
  kwset: move translation table from ctype
  sane-ctype.h: create header for sane-ctype macros
  git-compat-util: move wrapper.c funcs to its header
  git-compat-util: move strbuf.c funcs to its header
</content>
</entry>
<entry>
<title>Merge branch 'rs/userformat-find-requirements-simplify'</title>
<updated>2023-07-17T18:30:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-17T18:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d383b4f24e29a4654276d54f8ba9102230342c09'/>
<id>urn:sha1:d383b4f24e29a4654276d54f8ba9102230342c09</id>
<content type='text'>
Code simplification.

* rs/userformat-find-requirements-simplify:
  pretty: use strchr(3) in userformat_find_requirements()
</content>
</entry>
<entry>
<title>Merge branch 'rs/pretty-format-double-negation-fix'</title>
<updated>2023-07-17T18:30:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-17T18:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55e8fad660e52df2be425a65d409226237fcff48'/>
<id>urn:sha1:55e8fad660e52df2be425a65d409226237fcff48</id>
<content type='text'>
Code clarification.

* rs/pretty-format-double-negation-fix:
  pretty: avoid double negative in format_commit_item()
</content>
</entry>
<entry>
<title>pretty: use strchr(3) in userformat_find_requirements()</title>
<updated>2023-07-07T22:32:57Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2023-07-07T19:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd19ee9c459b2d7872a8e486fd9c2f1b17d662a5'/>
<id>urn:sha1:bd19ee9c459b2d7872a8e486fd9c2f1b17d662a5</id>
<content type='text'>
The strbuf_expand_step() loop in userformat_find_requirements() iterates
through the percent signs in the string "fmt", but we're not interested
in its effect on the strbuf "dummy".  Use strchr(3) instead and get rid
of the strbuf that we no longer need.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: avoid double negative in format_commit_item()</title>
<updated>2023-07-07T19:05:42Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2023-07-07T18:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1dd14e8e934873eac6168649da4f200cda029b7b'/>
<id>urn:sha1:1dd14e8e934873eac6168649da4f200cda029b7b</id>
<content type='text'>
Test for equality with no_flush, which has enough negation already.  Get
rid of the unnecessary parentheses while at it.

Signed-off-by: René 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 'gc/config-context'</title>
<updated>2023-07-06T18:54:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-06T18:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3d1c85d4833aef546f11e4d37516a1ececaefc3'/>
<id>urn:sha1:b3d1c85d4833aef546f11e4d37516a1ececaefc3</id>
<content type='text'>
Reduce reliance on a global state in the config reading API.

* gc/config-context:
  config: pass source to config_parser_event_fn_t
  config: add kvi.path, use it to evaluate includes
  config.c: remove config_reader from configsets
  config: pass kvi to die_bad_number()
  trace2: plumb config kvi
  config.c: pass ctx with CLI config
  config: pass ctx with config files
  config.c: pass ctx in configsets
  config: add ctx arg to config_fn_t
  urlmatch.h: use config_fn_t type
  config: inline git_color_default_config
</content>
</entry>
</feed>
