From: Junio C Hamano Date: Thu, 22 Mar 2018 21:24:21 +0000 (-0700) Subject: Merge branch 'bc/doc-interpret-trailers-grammofix' into maint X-Git-Tag: v2.16.3~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/dfc20a5e3c5f15e625044ef919c943bbc5a6aefc?hp=-c Merge branch 'bc/doc-interpret-trailers-grammofix' into maint Docfix. * bc/doc-interpret-trailers-grammofix: docs/interpret-trailers: fix agreement error --- dfc20a5e3c5f15e625044ef919c943bbc5a6aefc diff --combined Documentation/git-interpret-trailers.txt index 9dd19a1dd9,a861fc0c84..ff446f15f7 --- a/Documentation/git-interpret-trailers.txt +++ b/Documentation/git-interpret-trailers.txt @@@ -3,27 -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 [(=|:)])...] [...] +'git interpret-trailers' [options] [(--trailer [(=|:)])...] [...] +'git interpret-trailers' [options] [--parse] [...] 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 - arguments or the standard input if no 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. + arguments or the standard input if no 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 @@@ -51,7 -48,7 +51,7 @@@ with only spaces at the end of the comm will be added before the new trailer. Existing trailers are extracted from the input message by looking for - a group of one or more lines that (i) are all trailers, or (ii) contains at + a group of one or more lines that (i) is all trailers, or (ii) contains at least one Git-generated or user-configured trailer and consists of at least 25% trailers. The group must be preceded by one or more empty (or whitespace-only) lines. @@@ -83,45 -80,6 +83,45 @@@ OPTION trailer to the input messages. See the description of this command. +--where :: +--no-where:: + Specify where all new trailers will be added. A setting + provided with '--where' overrides all configuration variables + and applies to all '--trailer' options until the next occurrence of + '--where' or '--no-where'. + +--if-exists :: +--no-if-exists:: + Specify what action will be performed when there is already at + least one trailer with the same in the message. A setting + provided with '--if-exists' overrides all configuration variables + and applies to all '--trailer' options until the next occurrence of + '--if-exists' or '--no-if-exists'. + +--if-missing :: +--no-if-missing:: + Specify what action will be performed when there is no other + trailer with the same in the message. A setting + provided with '--if-missing' overrides all configuration variables + 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 ----------------------- @@@ -165,7 -123,7 +165,7 @@@ trailer.ifexists: same in the message. + The valid values for this option are: `addIfDifferentNeighbor` (this -is the default), `addIfDifferent`, `add`, `overwrite` or `doNothing`. +is the default), `addIfDifferent`, `add`, `replace` or `doNothing`. + With `addIfDifferentNeighbor`, a new trailer will be added only if no trailer with the same (, ) pair is above or below the line @@@ -212,8 -170,8 +212,8 @@@ trailer..where: configuration variable and it overrides what is specified by that option for trailers with the specified . -trailer..ifexist:: - This option takes the same values as the 'trailer.ifexist' +trailer..ifexists:: + This option takes the same values as the 'trailer.ifexists' configuration variable and it overrides what is specified by that option for trailers with the specified .