<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pretty.c, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-06-18T01:15:04Z</updated>
<entry>
<title>use COPY_ARRAY for copying arrays</title>
<updated>2019-06-18T01:15:04Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-06-15T18:36:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=921d49be86bd44ca290c8db6cc6f419dac3ed442'/>
<id>urn:sha1:921d49be86bd44ca290c8db6cc6f419dac3ed442</id>
<content type='text'>
Convert calls of memcpy(3) to use COPY_ARRAY, which shortens and
simplifies the code a bit.

Patch generated by Coccinelle and contrib/coccinelle/array.cocci.

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>pretty: drop unused strbuf from parse_padding_placeholder()</title>
<updated>2019-03-20T09:34:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-03-20T08:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a1180fc304ad9831641e5788e9c8d3dfc10ccdd'/>
<id>urn:sha1:9a1180fc304ad9831641e5788e9c8d3dfc10ccdd</id>
<content type='text'>
Unlike other parts of the --pretty user-format expansion,
this function is not actually writing to the output, but
instead just storing the padding values into a context
struct. We don't need to be passed a strbuf at all.

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>pretty: drop unused "type" parameter in needs_rfc2047_encoding()</title>
<updated>2019-03-20T09:34:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-03-20T08:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da55ff3d84b9edc635aba4a986de25ec219acd7a'/>
<id>urn:sha1:da55ff3d84b9edc635aba4a986de25ec219acd7a</id>
<content type='text'>
The "should we encode" check was split off from add_rfc2047() into its
own function in 41dd00bad3 (format-patch: fix rfc2047 address encoding
with respect to rfc822 specials, 2012-10-18). But only the "add" half
needs to know the rfc2047_type, since it only affects _how_ we encode,
not whether we do.

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 'nd/completion-more-parameters'</title>
<updated>2019-03-07T00:59:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-03-07T00:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0e7fb2e5cc70a03d75e41fe6b1bde6fdc0872c8'/>
<id>urn:sha1:b0e7fb2e5cc70a03d75e41fe6b1bde6fdc0872c8</id>
<content type='text'>
The command line completion (in contrib/) has been taught to
complete more subcommand parameters.

* nd/completion-more-parameters:
  completion: add more parameter value completion
</content>
</entry>
<entry>
<title>Merge branch 'aw/pretty-trailers'</title>
<updated>2019-03-07T00:59:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-03-07T00:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=42977bf5c7306e4c2dded5353f39cf087cf23a1f'/>
<id>urn:sha1:42977bf5c7306e4c2dded5353f39cf087cf23a1f</id>
<content type='text'>
The %(trailers) formatter in "git log --format=..."  now allows to
optionally pick trailers selectively by keyword, show only values,
etc.

* aw/pretty-trailers:
  pretty: add support for separator option in %(trailers)
  strbuf: separate callback for strbuf_expand:ing literals
  pretty: add support for "valueonly" option in %(trailers)
  pretty: allow showing specific trailers
  pretty: single return path in %(trailers) handling
  pretty: allow %(trailers) options with explicit value
  doc: group pretty-format.txt placeholders descriptions
</content>
</entry>
<entry>
<title>completion: add more parameter value completion</title>
<updated>2019-02-20T20:31:56Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-02-16T11:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a59a2301f6ec9bcf1b101edb9ca33beb465842f'/>
<id>urn:sha1:5a59a2301f6ec9bcf1b101edb9ca33beb465842f</id>
<content type='text'>
This adds value completion for a couple more paramters. To make it
easier to maintain these hard coded lists, add a comment at the original
list/code to remind people to update git-completion.bash too.

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 'sb/more-repo-in-api'</title>
<updated>2019-02-05T22:26:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-05T22:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b99a579f8e434a7757f90895945b5711b3f159d5'/>
<id>urn:sha1:b99a579f8e434a7757f90895945b5711b3f159d5</id>
<content type='text'>
The in-core repository instances are passed through more codepaths.

* sb/more-repo-in-api: (23 commits)
  t/helper/test-repository: celebrate independence from the_repository
  path.h: make REPO_GIT_PATH_FUNC repository agnostic
  commit: prepare free_commit_buffer and release_commit_memory for any repo
  commit-graph: convert remaining functions to handle any repo
  submodule: don't add submodule as odb for push
  submodule: use submodule repos for object lookup
  pretty: prepare format_commit_message to handle arbitrary repositories
  commit: prepare logmsg_reencode to handle arbitrary repositories
  commit: prepare repo_unuse_commit_buffer to handle any repo
  commit: prepare get_commit_buffer to handle any repo
  commit-reach: prepare in_merge_bases[_many] to handle any repo
  commit-reach: prepare get_merge_bases to handle any repo
  commit-reach.c: allow get_merge_bases_many_0 to handle any repo
  commit-reach.c: allow remove_redundant to handle any repo
  commit-reach.c: allow merge_bases_many to handle any repo
  commit-reach.c: allow paint_down_to_common to handle any repo
  commit: allow parse_commit* to handle any repo
  object: parse_object to honor its repository argument
  object-store: prepare has_{sha1, object}_file to handle any repo
  object-store: prepare read_object_file to deal with any repo
  ...
</content>
</entry>
<entry>
<title>pretty: add support for separator option in %(trailers)</title>
<updated>2019-01-29T18:03:32Z</updated>
<author>
<name>Anders Waldenborg</name>
<email>anders@0x63.nu</email>
</author>
<published>2019-01-28T21:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b691d8685131c2c10e1a2cf2acc9b8920c5365f'/>
<id>urn:sha1:0b691d8685131c2c10e1a2cf2acc9b8920c5365f</id>
<content type='text'>
By default trailer lines are terminated by linebreaks ('\n'). By
specifying the new 'separator' option they will instead be separated by
user provided string and have separator semantics rather than terminator
semantics. The separator string can contain the literal formatting codes
%n and %xNN allowing it to be things that are otherwise hard to type
such as %x00, or comma and end-parenthesis which would break parsing.

E.g:
 $ git log --pretty='%(trailers:key=Reviewed-by,valueonly,separator=%x00)'

Signed-off-by: Anders Waldenborg &lt;anders@0x63.nu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: separate callback for strbuf_expand:ing literals</title>
<updated>2019-01-29T18:03:32Z</updated>
<author>
<name>Anders Waldenborg</name>
<email>anders@0x63.nu</email>
</author>
<published>2019-01-28T21:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd2015b323d283c73346d70d2285a927650bb60a'/>
<id>urn:sha1:fd2015b323d283c73346d70d2285a927650bb60a</id>
<content type='text'>
Expanding '%n' and '%xNN' is generic functionality, so extract that from
the pretty.c formatter into a callback that can be reused.

No functional change intended

Signed-off-by: Anders Waldenborg &lt;anders@0x63.nu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: add support for "valueonly" option in %(trailers)</title>
<updated>2019-01-29T18:03:32Z</updated>
<author>
<name>Anders Waldenborg</name>
<email>anders@0x63.nu</email>
</author>
<published>2019-01-28T21:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9b936db5226ed4b87d42a2c91324adc50c768b6'/>
<id>urn:sha1:d9b936db5226ed4b87d42a2c91324adc50c768b6</id>
<content type='text'>
With the new "key=" option to %(trailers) it often makes little sense to
show the key, as it by definition already is knows which trailer is
printed there. This new "valueonly" option makes it omit the key when
printing trailers.

E.g.:
 $ git show -s --pretty='%s%n%(trailers:key=Signed-off-by,valueonly)' aaaa88182
will show:
 &gt; upload-pack: fix broken if/else chain in config callback
 &gt; Jeff King &lt;peff@peff.net&gt;
 &gt; Junio C Hamano &lt;gitster@pobox.com&gt;

Signed-off-by: Anders Waldenborg &lt;anders@0x63.nu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
