From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Theodore Ts'o <tytso@mit•edu>, Git Mailing List <git@vger•kernel.org>
Subject: Re: [PATCH 3/5] doc/pretty-formats: describe index/time formats for %gd
Date: Mon, 11 Jul 2016 19:01:50 -0700 [thread overview]
Message-ID: <xmqqtwfv7gxd.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160712000841.GB26163@sigill.intra.peff.net> (Jeff King's message of "Mon, 11 Jul 2016 20:08:42 -0400")
Jeff King <peff@peff•net> writes:
> Maybe this on top of the other documentation patches?
>
> -- >8 --
> Subject: [PATCH] doc/pretty-formats: explain shortening of %gd
>
> The actual shortening rules aren't that interesting and
> probably not worth getting into (I gloss over them here as
> "shortened for human readability"). But the fact that %gD
> shows whatever you gave on the command line is subtle and
> worth mentioning. Since most people will feed a shortened
> refname in the first place, it otherwise makes it hard to
> understand the difference between the two.
>
> Signed-off-by: Jeff King <peff@peff•net>
> ---
> Documentation/pretty-formats.txt | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
> index 36a300a..b95d67e 100644
> --- a/Documentation/pretty-formats.txt
> +++ b/Documentation/pretty-formats.txt
> @@ -149,9 +149,12 @@ endif::git-rev-list[]
> - '%GK': show the key used to sign a signed commit
> - '%gD': reflog selector, e.g., `refs/stash@{1}` or
> `refs/stash@{2 minutes ago`}; the format follows the rules described
> - for the `-g` option
> -- '%gd': shortened reflog selector, e.g., `stash@{1}` or
> - `stash@{2 minutes ago}`
> + for the `-g` option. The portion before the `@` is the refname as
> + given on the command line (so `git log -g refs/heads/master` would
> + yield `refs/heads/master@{0}`).
> +- '%gd': shortened reflog selector; same as `%gD`, but the refname
> + portion is shortened for human readability (so `refs/heads/master`
> + becomes just `master`).
Sounds about the right amount of detail to me. Thanks.
> - '%gn': reflog identity name
> - '%gN': reflog identity name (respecting .mailmap, see
> linkgit:git-shortlog[1] or linkgit:git-blame[1])
next prev parent reply other threads:[~2016-07-12 2:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-10 5:54 [PATCH] pretty: add format specifiers: %gr, %gt, %gI, gi Theodore Ts'o
2016-07-10 6:16 ` Jeff King
2016-07-10 14:26 ` Theodore Ts'o
2016-07-10 16:05 ` Duy Nguyen
2016-07-10 23:28 ` Theodore Ts'o
2016-07-11 5:02 ` Jeff King
2016-07-11 5:03 ` [PATCH 1/5] doc/rev-list-options: clarify "commit@{Nth}" for "-g" option Jeff King
2016-07-11 5:04 ` [PATCH 2/5] doc/rev-list-options: explain "-g" output formats Jeff King
2016-07-11 5:05 ` [PATCH 3/5] doc/pretty-formats: describe index/time formats for %gd Jeff King
2016-07-11 16:48 ` Theodore Ts'o
2016-07-12 0:08 ` Jeff King
2016-07-12 2:01 ` Junio C Hamano [this message]
2016-07-11 5:06 ` [PATCH 4/5] date: document and test "raw-local" mode Jeff King
2016-07-11 16:50 ` Theodore Ts'o
2016-07-12 0:16 ` Jeff King
2016-07-11 5:07 ` [PATCH 5/5] date: add "unix" format Jeff King
2016-07-11 16:43 ` [PATCH] pretty: add format specifiers: %gr, %gt, %gI, gi Theodore Ts'o
2016-07-11 19:07 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqtwfv7gxd.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
--cc=tytso@mit$(echo .)edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox