aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pretty-formats.txt
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2009-03-22 19:14:01 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-22 21:32:13 -0700
commit46d164b0cd1d5d254047d7573c53e368e42bf5e5 (patch)
treec382d4a26b5c3c33712063fe4545cc31aa8591e4 /Documentation/pretty-formats.txt
parent636991be2d2ce8368cd6735473954b1ebfa989bf (diff)
downloadgit-46d164b0cd1d5d254047d7573c53e368e42bf5e5.tar.gz
pretty.c: add %f format specifier to format_commit_message()
This specifier represents the sanitized and filename friendly subject line of a commit. No checks are made against the length of the string, so users may need to trim the result to the desired length if using as a filename. This is commonly used by format-patch to massage commit subjects into filenames and output patches to files. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-rw-r--r--Documentation/pretty-formats.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 5c6e678aa3..2a845b1e57 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -121,6 +121,7 @@ The placeholders are:
- '%d': ref names, like the --decorate option of linkgit:git-log[1]
- '%e': encoding
- '%s': subject
+- '%f': sanitized subject line, suitable for a filename
- '%b': body
- '%Cred': switch color to red
- '%Cgreen': switch color to green