[PATCH 3/5] doc/pretty-formats: describe index/time formats for %gd
- From
Jeff King <peff@peff.net>
- Date
- Jul 11, 2016, 05:05 UTC
- Message-ID
- <20160711050513.GC32514@sigill.intra.peff.net>
- In-Reply-To
- <20160711050201.GA18031@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.0.406.g77f030d