doc/pretty-formats: describe index/time formats for %gd
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jul 22, 2016 at 15:51 UTC
522259dc3adf49b59d76ee046a2d1361b171e32f
1 file changed
+5
-2
Documentation/pretty-formats.txt
+5
-2
@@ -147,8 +147,11 @@ endif::git-rev-list[]
147
"U" for a good signature with unknown validity and "N" for no signature
148
- '%GS': show the name of the signer for a signed commit
149
- '%GK': show the key used to sign a signed commit
150
-- '%gD': reflog selector, e.g., `refs/stash@{1}`
151
-- '%gd': shortened reflog selector, e.g., `stash@{1}`
150
+- '%gD': reflog selector, e.g., `refs/stash@{1}` or
151
+ `refs/stash@{2 minutes ago`}; the format follows the rules described
152
+ for the `-g` option
153
+- '%gd': shortened reflog selector, e.g., `stash@{1}` or
154
+ `stash@{2 minutes ago}`
155
- '%gn': reflog identity name
156
- '%gN': reflog identity name (respecting .mailmap, see
157
linkgit:git-shortlog[1] or linkgit:git-blame[1])