Created
March 28, 2011 20:07
-
-
Save wpalmer/891160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt | |
index d987102..28b9bb9 100644 | |
--- a/Documentation/pretty-formats.txt | |
+++ b/Documentation/pretty-formats.txt | |
@@ -97,7 +97,13 @@ The title was >>t4119: test autocomputing -p<n> for traditional diff input.<< | |
-------- | |
+ | |
-The placeholders are: | |
+The placeholders are divided into two categories, "short forms", | |
+for quickly typing the more-common placeholders, and "long forms", | |
+which may be more readable, and may support various additional | |
+options. | |
+ | |
++ | |
+Short forms: | |
- '%H': commit hash | |
- '%h': abbreviated commit hash | |
@@ -138,14 +144,31 @@ The placeholders are: | |
- '%Cblue': switch color to blue | |
- '%Creset': reset color | |
- '%C(...)': color specification, as described in color.branch.* config option | |
-- '%(color:...)': alternative form of %C(...) | |
- '%m': left, right or boundary mark | |
- '%n': newline | |
- '%%': a raw '%' | |
- '%x00': print a byte from a hex code | |
- '%w([<w>[,<i1>[,<i2>]]])': switch line wrapping, like the -w option of | |
linkgit:git-shortlog[1]. | |
+ | |
+Long forms: | |
+ | |
+- '%(authorname[:mailmap])': author name, optionally respecting | |
+ .mailmap (see linkgit:git-shortlog[1] or linkgit:git-blame[1]) | |
+- '%(authoremail[:mailmap])': author email, optionally respecting | |
+ .mailmap (see linkgit:git-shortlog[1] or linkgit:git-blame[1]) | |
+- '%(authordate[:<format>])': author date. Without a <format>, the | |
+ --date= option is respected. Otherwise, a format of the type which | |
+ can be specified via the --date= option is taken. | |
+- '%(committername[:mailmap])': committer name, optionally respecting | |
+ .mailmap. (see linkgit:git-shortlog[1] or linkgit:git-blame[1]) | |
+- '%(committeremail[:mailmap])': committer email, optionally respecting | |
+ .mailmap. (see linkgit:git-shortlog[1] or linkgit:git-blame[1]) | |
+- '%(committerdate[:<format>])': committer date. Without a <format>, | |
+ the --date= option is respected. Otherwise, a format of the type | |
+ which can be specified via the --date= option is taken. | |
- '%(wrap:[<w>[,<i1>[,<i2>]]])': alternative form of %w(...) | |
+- '%(color:...)': alternative form of %C(...) | |
NOTE: Some placeholders may depend on other options given to the | |
revision traversal engine. For example, the `%g*` reflog options will |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment