Home Explore Blog CI



git

1st chunk of `Documentation/config/trailer.adoc`
55e8a018970eae613bcfcd9d8066e696683ff331903f21040000000100000b60
trailer.separators::
	This option tells which characters are recognized as trailer
	separators. By default only ':' is recognized as a trailer
	separator, except that '=' is always accepted on the command
	line for compatibility with other git commands.
+
The first character given by this option will be the default character
used when another separator is not specified in the config for this
trailer.
+
For example, if the value for this option is "%=$", then only lines
using the format '<key><sep><value>' with <sep> containing '%', '='
or '$' and then spaces will be considered trailers. And '%' will be
the default separator used, so by default trailers will appear like:
'<key>% <value>' (one percent sign and one space will appear between
the key and the value).

trailer.where::
	This option tells where a new trailer will be added.
+
This can be `end`, which is the default, `start`, `after` or `before`.
+
If it is `end`, then each new trailer will appear at the end of the
existing trailers.
+
If it is `start`, then each new trailer will appear at the start,
instead of the end, of the existing trailers.
+
If it is `after`, then each new trailer will appear just after the
last trailer with the same <key>.
+
If it is `before`, then each new trailer will appear just before the
first trailer with the same <key>.

trailer.ifexists::
	This option makes it possible to choose what action will be
	performed when there is already at least one trailer with the
	same <key> in the input.
+
The valid values for this option are: `addIfDifferentNeighbor` (this
is the default), `addIfDifferent`, `add`, `replace` or `doNothing`.
+
With `addIfDifferentNeighbor`, a new trailer will be added only if no
trailer with the same (<key>, <value>) pair is above or below the line
where the new trailer will be added.
+
With `addIfDifferent`, a new trailer will be added only if no trailer
with the same (<key>, <value>) pair is already in the input.
+
With `add`, a new trailer will be added, even if some trailers with
the same (<key>, <value>) pair are already in the input.
+
With `replace`, an existing trailer with the same <key> will be
deleted and the new trailer will be added. The deleted trailer will be
the closest one (with the same <key>) to the place where the new one
will be added.
+
With `doNothing`, nothing will be done; that is no new trailer will be
added if there is already one with the same <key> in the input.

trailer.ifmissing::
	This option makes it possible to choose what action will be
	performed when there is not yet any trailer with the same
	<key> in the input.
+
The valid values for this option are: `add` (this is the default) and
`doNothing`.
+
With `add`, a new trailer will be added.
+
With `doNothing`, nothing will be done.

trailer.<keyAlias>.key::
	Defines a <keyAlias> for the <key>. The <keyAlias> must be a
	prefix (case does not matter) of the <key>. For example,

Title: Git Trailer Configuration Options
Summary
This section describes various configuration options for trailers in Git, including separator characters, trailer placement, and actions to take when a trailer with the same key already exists or is missing.