Skip to content

Commit 522259d

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 83c9f95 commit 522259d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Documentation/pretty-formats.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ endif::git-rev-list[]
147147
"U" for a good signature with unknown validity and "N" for no signature
148148
- '%GS': show the name of the signer for a signed commit
149149
- '%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}`
152155
- '%gn': reflog identity name
153156
- '%gN': reflog identity name (respecting .mailmap, see
154157
linkgit:git-shortlog[1] or linkgit:git-blame[1])

0 commit comments

Comments
 (0)