X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fpretty-formats.txt;h=1686a54d22a746036b997d6eb8d5b85ca1d79c5d;hb=1367b12ad623e28546ba40c435015d94e7fbb248;hp=0683fb3a3d34e89c67c6e37f2ee96adcd2821ea0;hpb=41d5b7e362c33dc54cbc814e50403a2084204f9f;p=git.git diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 0683fb3a3..bd760d3bd 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -123,6 +123,7 @@ The placeholders are: - '%s': subject - '%f': sanitized subject line, suitable for a filename - '%b': body +- '%B': raw body (unwrapped subject and body) - '%N': commit notes - '%gD': reflog selector, e.g., `refs/stash@\{1\}` - '%gd': shortened reflog selector, e.g., `stash@\{1\}` @@ -134,6 +135,7 @@ The placeholders are: - '%C(...)': color specification, as described in color.branch.* config option - '%m': left, right or boundary mark - '%n': newline +- '%%': a raw '%' - '%x00': print a byte from a hex code - '%w([[,[,]]])': switch line wrapping, like the -w option of linkgit:git-shortlog[1]. @@ -144,6 +146,14 @@ 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. +If you add a `{plus}` (plus sign) after '%' of a placeholder, a line-feed +is inserted immediately before the expansion if and only if the +placeholder expands to a non-empty string. + +If you add a `-` (minus sign) after '%' of a placeholder, line-feeds that +immediately precede the expansion are deleted if and only if the +placeholder expands to an empty string. + * 'tformat:' + The 'tformat:' format works exactly like 'format:', except that it