X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fpretty-formats.txt;h=53a9168ba7d8959e65c2442f6a078155d6f24c71;hb=800d1fb0ab4bc9c1f4cd13f7cb7d8851f23a3e50;hp=09462021ead2591ae1f21f4441ff0bc357af2a1c;hpb=39add7a36feca434ba85267cb76e4fd69bcdc13a;p=git.git diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 09462021e..53a9168ba 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -135,6 +135,8 @@ The placeholders are: - '%m': left, right or boundary mark - '%n': newline - '%x00': print a byte from a hex code +- '%w([[,[,]]])': switch line wrapping, like the -w option of + linkgit:git-shortlog[1]. NOTE: Some placeholders may depend on other options given to the revision traversal engine. For example, the `%g*` reflog options will @@ -142,6 +144,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