From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Theodore Ts'o <tytso@mit.edu>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 3/6] doc/pretty-formats: describe index/time formats for %gd
Date: Fri, 22 Jul 2016 15:51:37 -0400 [thread overview]
Message-ID: <20160722195136.GC19648@sigill.intra.peff.net> (raw)
In-Reply-To: <20160722195105.GA19542@sigill.intra.peff.net>
The "reflog selector" format changes based on a series of
heuristics, and that applies equally to both stock "log -g"
output, as well as "--format=%gd". The documentation for
"%gd" doesn't cover this. Let's mention the multiple formats
and refer the user back to the "-g" section for the complete
rules.
Signed-off-by: Jeff King <peff@peff.net>
---
Documentation/pretty-formats.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 29b19b9..36a300a 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -147,8 +147,11 @@ endif::git-rev-list[]
"U" for a good signature with unknown validity and "N" for no signature
- '%GS': show the name of the signer for a signed commit
- '%GK': show the key used to sign a signed commit
-- '%gD': reflog selector, e.g., `refs/stash@{1}`
-- '%gd': shortened reflog selector, e.g., `stash@{1}`
+- '%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}`
- '%gn': reflog identity name
- '%gN': reflog identity name (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
--
2.9.2.512.gc1ef750
next prev parent reply other threads:[~2016-07-22 19:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 19:51 [PATCH v2 0/6] reflog docs and date-formatting Jeff King
2016-07-22 19:51 ` [PATCH v2 1/6] doc/rev-list-options: clarify "commit@{Nth}" for "-g" option Jeff King
2016-07-22 19:51 ` [PATCH v2 2/6] doc/rev-list-options: explain "-g" output formats Jeff King
2016-07-22 19:51 ` Jeff King [this message]
2016-07-22 19:51 ` [PATCH v2 4/6] doc/pretty-formats: explain shortening of %gd Jeff King
2016-07-22 19:51 ` [PATCH v2 5/6] date: document and test "raw-local" mode Jeff King
2016-07-23 10:15 ` Jakub Narębski
2016-07-26 18:47 ` Jeff King
2016-07-27 12:35 ` Jakub Narębski
2016-07-27 13:44 ` [PATCH v3 " Jeff King
2016-07-27 19:49 ` Junio C Hamano
2016-07-27 19:57 ` Jeff King
2016-07-27 20:11 ` Junio C Hamano
2016-07-27 20:16 ` Jeff King
2016-07-27 20:17 ` Junio C Hamano
2016-07-22 19:51 ` [PATCH v2 6/6] date: add "unix" format Jeff King
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=20160722195136.GC19648@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).