X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fpretty-formats.txt;h=0193c3ce58de4f51a164d43e68023fdf5639a920;hb=e4403d8bd3ccb6bcc3b6569012944d932334f5c4;hp=c551ea61d2870e6e4d5471ec4fcbca4fbd802b09;hpb=1924d64f6e070edf1ad1949bf2eb95d4d2451f30;p=git.git diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index c551ea61d..ec3755579 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -106,12 +106,14 @@ The placeholders are: - '%aD': author date, RFC2822 style - '%ar': author date, relative - '%at': author date, UNIX timestamp +- '%ai': author date, ISO 8601 format - '%cn': committer name - '%ce': committer email - '%cd': committer date - '%cD': committer date, RFC2822 style - '%cr': committer date, relative - '%ct': committer date, UNIX timestamp +- '%ci': committer date, ISO 8601 format - '%e': encoding - '%s': subject - '%b': body @@ -121,3 +123,26 @@ The placeholders are: - '%Creset': reset color - '%m': left, right or boundary mark - '%n': newline +- '%x00': print a byte from a hex code + +* 'tformat:' ++ +The 'tformat:' format works exactly like 'format:', except that it +provides "terminator" semantics instead of "separator" semantics. In +other words, each commit has the message terminator character (usually a +newline) appended, rather than a separator placed between entries. +This means that the final entry of a single-line format will be properly +terminated with a new line, just as the "oneline" format does. +For example: ++ +--------------------- +$ git log -2 --pretty=format:%h 4da45bef \ + | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' +4da45be +7134973 -- NO NEWLINE + +$ git log -2 --pretty=tformat:%h 4da45bef \ + | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' +4da45be +7134973 +---------------------