summaryrefslogtreecommitdiff
path: root/Documentation/git-for-each-ref.txt
diff options
context:
space:
mode:
authorHariom Verma <hariom18599@gmail.com>2020-08-21 21:41:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-28 20:52:51 (GMT)
commit905f0a4e64bef35482a999dd01c64945b260c010 (patch)
tree14b8cf6595a2a14fc211ac7208e83a97ec4fb9a4 /Documentation/git-for-each-ref.txt
parent47d4676ac8a50b7d53e12ae200ed9b5661522129 (diff)
downloadgit-905f0a4e64bef35482a999dd01c64945b260c010.zip
git-905f0a4e64bef35482a999dd01c64945b260c010.tar.gz
git-905f0a4e64bef35482a999dd01c64945b260c010.tar.bz2
ref-filter: add `sanitize` option for 'subject' atom
Currently, subject does not take any arguments. This commit introduce `sanitize` formatting option to 'subject' atom. `subject:sanitize` - print sanitized subject line, suitable for a filename. e.g. %(subject): "the subject line" %(subject:sanitize): "the-subject-line" Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Hariom Verma <hariom18599@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-for-each-ref.txt')
-rw-r--r--Documentation/git-for-each-ref.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index dd09763..616ce46 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -247,6 +247,9 @@ contents:subject::
The first paragraph of the message, which typically is a
single line, is taken as the "subject" of the commit or the
tag message.
+ Instead of `contents:subject`, field `subject` can also be used to
+ obtain same results. `:sanitize` can be appended to `subject` for
+ subject line suitable for filename.
contents:body::
The remainder of the commit or the tag message that follows