]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/pretty-formats.txt
Merge branch 'jh/notes' (early part)
[thirdparty/git.git] / Documentation / pretty-formats.txt
index 5fb10b3a1525dabd0f0e75835847a6187fa99a30..09462021ead2591ae1f21f4441ff0bc357af2a1c 100644 (file)
@@ -124,6 +124,9 @@ The placeholders are:
 - '%f': sanitized subject line, suitable for a filename
 - '%b': body
 - '%N': commit notes
+- '%gD': reflog selector, e.g., `refs/stash@\{1\}`
+- '%gd': shortened reflog selector, e.g., `stash@\{1\}`
+- '%gs': reflog subject
 - '%Cred': switch color to red
 - '%Cgreen': switch color to green
 - '%Cblue': switch color to blue
@@ -133,6 +136,12 @@ The placeholders are:
 - '%n': newline
 - '%x00': print a byte from a hex code
 
+NOTE: Some placeholders may depend on other options given to the
+revision traversal engine. For example, the `%g*` reflog options will
+insert an empty string unless we are traversing reflog entries (e.g., by
+`git log -g`). The `%d` placeholder will use the "short" decoration
+format if `--decorate` was not already provided on the command line.
+
 * 'tformat:'
 +
 The 'tformat:' format works exactly like 'format:', except that it