<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pretty.c, branch v2.25.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.25.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.25.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-12-10T21:11:43Z</updated>
<entry>
<title>Merge branch 'dl/pretty-reference'</title>
<updated>2019-12-10T21:11:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-10T21:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d37cfe3b5c7ef64aff0459ce2730464120c97f30'/>
<id>urn:sha1:d37cfe3b5c7ef64aff0459ce2730464120c97f30</id>
<content type='text'>
"git log" family learned "--pretty=reference" that gives the name
of a commit in the format that is often used to refer to it in log
messages.

* dl/pretty-reference:
  SubmittingPatches: use `--pretty=reference`
  pretty: implement 'reference' format
  pretty: add struct cmt_fmt_map::default_date_mode_type
  pretty: provide short date format
  t4205: cover `git log --reflog -z` blindspot
  pretty.c: inline initalize format_context
  revision: make get_revision_mark() return const pointer
  completion: complete `tformat:` pretty format
  SubmittingPatches: remove dq from commit reference
  pretty-formats.txt: use generic terms for hash
  SubmittingPatches: use generic terms for hash
</content>
</entry>
<entry>
<title>pretty: implement 'reference' format</title>
<updated>2019-11-20T04:33:37Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-11-20T00:51:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f0fc1db8599f87520494ca4f0e3c1b6fabdf997'/>
<id>urn:sha1:1f0fc1db8599f87520494ca4f0e3c1b6fabdf997</id>
<content type='text'>
The standard format for referencing other commits within some projects
(such as git.git) is the reference format. This is described in
Documentation/SubmittingPatches as

	If you want to reference a previous commit in the history of a stable
	branch, use the format "abbreviated hash (subject, date)", like this:

	....
		Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)
		noticed that ...
	....

Since this format is so commonly used, standardize it as a pretty
format.

The tests that are implemented essentially show that the format-string
does not change in response to various log options. This is useful
because, for future developers, it shows that we've considered the
limitations of the "canned format-string" approach and we are fine with
them.

Based-on-a-patch-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: add struct cmt_fmt_map::default_date_mode_type</title>
<updated>2019-11-20T04:33:36Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-11-20T00:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=618a855083fbd3b8f9491ec8b32b39bdea91868d'/>
<id>urn:sha1:618a855083fbd3b8f9491ec8b32b39bdea91868d</id>
<content type='text'>
In a future commit, we plan on having a pretty format which will use a
default date format unless otherwise overidden. Add support for this by
adding a `default_date_mode_type` member in `struct cmt_fmt_map`.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: provide short date format</title>
<updated>2019-11-20T04:33:36Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-11-20T00:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0df621172d830adf36d4226b98f9cf4006d183a6'/>
<id>urn:sha1:0df621172d830adf36d4226b98f9cf4006d183a6</id>
<content type='text'>
Add the placeholders %as and %cs to format author date and committer
date, respectively, without the time part, like --date=short does, i.e.
like YYYY-MM-DD.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty.c: inline initalize format_context</title>
<updated>2019-11-20T04:33:36Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-11-20T00:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e8ed3b93e9b46eb6fe61589482751728865de57'/>
<id>urn:sha1:3e8ed3b93e9b46eb6fe61589482751728865de57</id>
<content type='text'>
Instead of memsetting and then initializing the fields in the struct,
move the initialization of `format_context` to its assignment.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: add "%aL" etc. to show local-part of email addresses</title>
<updated>2019-10-30T02:49:41Z</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2019-10-29T12:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8b8217c8a16944dc61a1553464efabc450a6680'/>
<id>urn:sha1:d8b8217c8a16944dc61a1553464efabc450a6680</id>
<content type='text'>
In many projects the number of contributors is low enough that users know
each other and the full email address doesn't need to be displayed.
Displaying only the author's username saves a lot of columns on the screen.

Existing 'e/E' (as in "%ae" and "%aE") placeholders would show the
author's address as "prarit@redhat.com", which would waste columns to show
the same domain-part for all contributors when used in a project internal
to redhat.  Introduce 'l/L' placeholders that strip '@' and domain part from
the e-mail address.

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>log-tree: call load_ref_decorations() in get_name_decoration()</title>
<updated>2019-09-09T18:16:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-09-08T17:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0cc7380d8846c30ce0d5d6310b2cb5994f269133'/>
<id>urn:sha1:0cc7380d8846c30ce0d5d6310b2cb5994f269133</id>
<content type='text'>
Load a default set of ref name decorations at the first lookup.  This
frees direct and indirect callers from doing so.  They can still do it
if they want to use a filter or are interested in full decorations
instead of the default short ones -- the first load_ref_decorations()
call wins.

This means that the load in builtin/log.c::cmd_log_init_finish() is
respected even if --simplify-by-decoration is given, as the previously
dominating earlier load in handle_revision_opt() is gone.  So a filter
given with --decorate-refs-exclude is used for simplification in that
case, as expected.

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>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>
</feed>
