aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-interpret-trailers.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-26 22:55:04 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-26 22:55:04 -0700
commit06cf4f2d87d670f6d49c208fa41933941205da90 (patch)
tree6f140af0079107fb72d9d986b7eb0ad447edc1dc /Documentation/git-interpret-trailers.txt
parentbfd91b41341cb922aa1ba6e7c01ccd5ebb81cf41 (diff)
parent5a0d0c037cc187a6eee6329206b9f6a48746a054 (diff)
downloadgit-06cf4f2d87d670f6d49c208fa41933941205da90.tar.gz
Merge branch 'jk/trailers-parse'
"git interpret-trailers" has been taught a "--parse" and a few other options to make it easier for scripts to grab existing trailer lines from a commit log message. * jk/trailers-parse: doc/interpret-trailers: fix "the this" typo pretty: support normalization options for %(trailers) t4205: refactor %(trailers) tests pretty: move trailer formatting to trailer.c interpret-trailers: add --parse convenience option interpret-trailers: add an option to unfold values interpret-trailers: add an option to show only existing trailers interpret-trailers: add an option to show only the trailers trailer: put process_trailers() options into a struct
Diffstat (limited to 'Documentation/git-interpret-trailers.txt')
-rw-r--r--Documentation/git-interpret-trailers.txt33
1 files changed, 26 insertions, 7 deletions
diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt
index 0ef93204f1..9dd19a1dd9 100644
--- a/Documentation/git-interpret-trailers.txt
+++ b/Documentation/git-interpret-trailers.txt
@@ -3,24 +3,27 @@ git-interpret-trailers(1)
NAME
----
-git-interpret-trailers - help add structured information into commit messages
+git-interpret-trailers - add or parse structured information in commit messages
SYNOPSIS
--------
[verse]
-'git interpret-trailers' [--in-place] [--trim-empty] [(--trailer <token>[(=|:)<value>])...] [<file>...]
+'git interpret-trailers' [options] [(--trailer <token>[(=|:)<value>])...] [<file>...]
+'git interpret-trailers' [options] [--parse] [<file>...]
DESCRIPTION
-----------
-Help adding 'trailers' lines, that look similar to RFC 822 e-mail
+Help parsing or adding 'trailers' lines, that look similar to RFC 822 e-mail
headers, at the end of the otherwise free-form part of a commit
message.
This command reads some patches or commit messages from either the
-<file> arguments or the standard input if no <file> is specified. Then
-this command applies the arguments passed using the `--trailer`
-option, if any, to the commit message part of each input file. The
-result is emitted on the standard output.
+<file> arguments or the standard input if no <file> is specified. If
+`--parse` is specified, the output consists of the parsed trailers.
+
+Otherwise, this command applies the arguments passed using the
+`--trailer` option, if any, to the commit message part of each input
+file. The result is emitted on the standard output.
Some configuration variables control the way the `--trailer` arguments
are applied to each commit message and the way any existing trailer in
@@ -103,6 +106,22 @@ OPTIONS
and applies to all '--trailer' options until the next occurrence of
'--if-missing' or '--no-if-missing'.
+--only-trailers::
+ Output only the trailers, not any other parts of the input.
+
+--only-input::
+ Output only trailers that exist in the input; do not add any
+ from the command-line or by following configured `trailer.*`
+ rules.
+
+--unfold::
+ Remove any whitespace-continuation in trailers, so that each
+ trailer appears on a line by itself with its full content.
+
+--parse::
+ A convenience alias for `--only-trailers --only-input
+ --unfold`.
+
CONFIGURATION VARIABLES
-----------------------