Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d05d84c
apply.c: fix -p argument parsing
Mroik Mar 16, 2026
daa91c6
doc: interpret-trailers: convert to synopsis style
LemmingAvalanche Mar 16, 2026
bec94f7
doc: interpret-trailers: normalize and fill out options
LemmingAvalanche Mar 16, 2026
95bd867
doc: config: convert trailers section to synopsis style
LemmingAvalanche Mar 16, 2026
3718226
interpret-trailers: use placeholder instead of *
LemmingAvalanche Mar 16, 2026
60d8c1e
refs: add 'preparing' phase to the reference-transaction hook
peijianju Mar 17, 2026
1ae7a35
use commit_stack instead of prio_queue in LIFO mode
rscharfe Mar 17, 2026
57246b7
merge-file: fix BUG when --object-id is used in a worktree
Mortal Mar 11, 2026
fc8a4f1
doc: add missing space on git-config page
gabldotink Mar 18, 2026
8872941
Introduce new "tools/" directory
pks-t Mar 19, 2026
8ca1b44
contrib: move "coccinelle/" directory into "tools/"
pks-t Mar 19, 2026
fe30966
contrib: move "coverage-diff.sh" script into "tools/"
pks-t Mar 19, 2026
405c98a
contrib: move "update-unicode.sh" script into "tools/"
pks-t Mar 19, 2026
a767f2f
builds: move build scripts into "tools/"
pks-t Mar 19, 2026
baa61e4
git-compat-util.h: move warning infra to prepare for PCHs
pks-t Mar 19, 2026
daa56fb
meson: compile compatibility sources separately
pks-t Mar 19, 2026
671df48
meson: precompile "git-compat-util.h"
pks-t Mar 19, 2026
753c810
rerere: update to modern representation of empty strbufs
gitster Mar 19, 2026
f64c50e
cocci: strbuf.buf is never NULL
gitster Mar 19, 2026
598f40c
contrib/diff-highlight: do not highlight identical pairs
peff Mar 17, 2026
ebd8fa7
Merge branch 'jk/diff-highlight-identical-pairs'
gitster Mar 27, 2026
d1f07dd
Merge branch 'ps/build-tweaks'
gitster Mar 27, 2026
968e62c
Merge branch 'rs/prio-queue-to-commit-stack'
gitster Mar 27, 2026
828988b
Merge branch 'mr/merge-file-object-id-worktree-fix'
gitster Mar 27, 2026
f230544
Merge branch 'gi/doc-boolean-config-typofix'
gitster Mar 27, 2026
cb77c3a
Merge branch 'mf/apply-p-no-atoi'
gitster Mar 27, 2026
ae55b12
Merge branch 'ej/ref-transaction-hook-preparing'
gitster Mar 27, 2026
18396dc
Merge branch 'kh/doc-interpret-trailers-1'
gitster Mar 27, 2026
7241be4
Merge branch 'jc/rerere-modern-strbuf-handling'
gitster Mar 27, 2026
5361983
The 22nd batch
gitster Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Documentation/RelNotes/2.54.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ UI, Workflows & Features

* "git history" learned the "split" subcommand.

* The reference-transaction hook was taught to be triggered before
taking locks on references in the "preparing" phase.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -231,6 +234,11 @@ Performance, Internal Implementation, Development Support etc.
* The logic to count objects has been cleaned up.
* Tweak the build infrastructure by moving tools around.
* Uses of prio_queue as a LIFO stack of commits have been written
with commit_stack.
Fixes since v2.53
-----------------
Expand Down Expand Up @@ -388,6 +396,16 @@ Fixes since v2.53
took an empty string as a valid <num>.
(merge 4f6a803aba ty/doc-diff-u-wo-number later to maint).

* The handling of the incomplete lines at the end by "git
diff-highlight" has been fixed.

* merge-file --object-id used to trigger a BUG when run in a linked
worktree, which has been fixed.
(merge 57246b7c62 mr/merge-file-object-id-worktree-fix later to maint).

* "git apply -p<n>" parses <n> more carefully now.
(merge d05d84c5f5 mf/apply-p-no-atoi later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge d79fff4a11 jk/remote-tracking-ref-leakfix later to maint).
(merge 7a747f972d dd/t5403-modernise later to maint).
Expand Down Expand Up @@ -435,3 +453,6 @@ Fixes since v2.53
(merge 2f05039717 rj/pack-refs-tests-path-is-helpers later to maint).
(merge 2594747ad1 jk/transport-color-leakfix later to maint).
(merge 48430e44ac mf/t0008-cleanup later to maint).
(merge fc8a4f15e7 gi/doc-boolean-config-typofix later to maint).
(merge 37182267a0 kh/doc-interpret-trailers-1 later to maint).
(merge f64c50e768 jc/rerere-modern-strbuf-handling later to maint).
121 changes: 61 additions & 60 deletions Documentation/config/trailer.adoc
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
trailer.separators::
`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
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
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
`<key>% <value>` (one percent sign and one space will appear between
the key and the value).

trailer.where::
`trailer.where`::
This option tells where a new trailer will be added.
+
This can be `end`, which is the default, `start`, `after` or `before`.
Expand All @@ -27,41 +27,41 @@ 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>.
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>.
first trailer with the same _<key>_.

trailer.ifexists::
`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.
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
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 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.
the same (_<key>_, _<value>_) pair are already in the input.
+
With `replace`, an existing trailer with the same <key> will be
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
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.
added if there is already one with the same _<key>_ in the input.

trailer.ifmissing::
`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.
_<key>_ in the input.
+
The valid values for this option are: `add` (this is the default) and
`doNothing`.
Expand All @@ -70,67 +70,68 @@ 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, in `git
config trailer.ack.key "Acked-by"` the "Acked-by" is the <key> and
the "ack" is the <keyAlias>. This configuration allows the shorter
`trailer.<key-alias>.key`::
Defines a _<key-alias>_ for the _<key>_. The _<key-alias>_ must be a
prefix (case does not matter) of the _<key>_. For example, in `git
config trailer.ack.key "Acked-by"` the `Acked-by` is the _<key>_ and
the `ack` is the _<key-alias>_. This configuration allows the shorter
`--trailer "ack:..."` invocation on the command line using the "ack"
<keyAlias> instead of the longer `--trailer "Acked-by:..."`.
`<key-alias>` instead of the longer `--trailer "Acked-by:..."`.
+
At the end of the <key>, a separator can appear and then some
space characters. By default the only valid separator is ':',
At the end of the _<key>_, a separator can appear and then some
space characters. By default the only valid separator is `:`,
but this can be changed using the `trailer.separators` config
variable.
+
If there is a separator in the key, then it overrides the default
separator when adding the trailer.

trailer.<keyAlias>.where::
This option takes the same values as the 'trailer.where'
`trailer.<key-alias>.where`::
This option takes the same values as the `trailer.where`
configuration variable and it overrides what is specified by
that option for trailers with the specified <keyAlias>.
that option for trailers with the specified _<key-alias>_.

trailer.<keyAlias>.ifexists::
This option takes the same values as the 'trailer.ifexists'
`trailer.<key-alias>.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 <keyAlias>.
that option for trailers with the specified _<key-alias>_.

trailer.<keyAlias>.ifmissing::
This option takes the same values as the 'trailer.ifmissing'
`trailer.<key-alias>.ifmissing`::
This option takes the same values as the `trailer.ifmissing`
configuration variable and it overrides what is specified by
that option for trailers with the specified <keyAlias>.
that option for trailers with the specified _<key-alias>_.

trailer.<keyAlias>.command::
Deprecated in favor of 'trailer.<keyAlias>.cmd'.
This option behaves in the same way as 'trailer.<keyAlias>.cmd', except
`trailer.<key-alias>.command`::
Deprecated in favor of `trailer.<key-alias>.cmd`.
This option behaves in the same way as `trailer.<key-alias>.cmd`, except
that it doesn't pass anything as argument to the specified command.
Instead the first occurrence of substring $ARG is replaced by the
<value> that would be passed as argument.
Instead the first occurrence of substring `$ARG` is replaced by the
_<value>_ that would be passed as argument.
+
Note that $ARG in the user's command is
only replaced once and that the original way of replacing $ARG is not safe.
Note that `$ARG` in the user's command is
only replaced once and that the original way of replacing `$ARG` is not safe.
+
When both 'trailer.<keyAlias>.cmd' and 'trailer.<keyAlias>.command' are given
for the same <keyAlias>, 'trailer.<keyAlias>.cmd' is used and
'trailer.<keyAlias>.command' is ignored.
When both `trailer.<key-alias>.cmd` and `trailer.<key-alias>.command` are given
for the same _<key-alias>_, `trailer.<key-alias>.cmd` is used and
`trailer.<key-alias>.command` is ignored.

trailer.<keyAlias>.cmd::
`trailer.<key-alias>.cmd`::
This option can be used to specify a shell command that will be called
once to automatically add a trailer with the specified <keyAlias>, and then
called each time a '--trailer <keyAlias>=<value>' argument is specified to
modify the <value> of the trailer that this option would produce.
once to automatically add a trailer with the specified _<key-alias>_, and then
called each time a `--trailer <key-alias>=<value>` argument is specified to
modify the _<value>_ of the trailer that this option would produce.
+
When the specified command is first called to add a trailer
with the specified <keyAlias>, the behavior is as if a special
'--trailer <keyAlias>=<value>' argument was added at the beginning
of the "git interpret-trailers" command, where <value>
is taken to be the standard output of the command with any
leading and trailing whitespace trimmed off.
with the specified _<key-alias>_, the behavior is as if a special
`--trailer <key-alias>=<value>` argument was added at the beginning
of linkgit:git-interpret-trailers[1], where _<value>_ is taken to be the
standard output of the command with any leading and trailing whitespace
trimmed off.
+
If some '--trailer <keyAlias>=<value>' arguments are also passed
If some `--trailer <key-alias>=<value>` arguments are also passed
on the command line, the command is called again once for each
of these arguments with the same <keyAlias>. And the <value> part
of these arguments with the same _<key-alias>_. And the _<value>_ part
of these arguments, if any, will be passed to the command as its
first argument. This way the command can produce a <value> computed
from the <value> passed in the '--trailer <keyAlias>=<value>' argument.
first argument. This way the command can produce a _<value>_ computed
from the _<value>_ passed in the `--trailer <key-alias>=<value>`
argument.
2 changes: 1 addition & 1 deletion Documentation/git-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Use `--no-value` to unset _<pattern>_.
+
Valid `<type>`'s include:
+
- 'bool': canonicalize values `true`, `yes`,`on`, and positive
- 'bool': canonicalize values `true`, `yes`, `on`, and positive
numbers as "true", and values `false`, `no`, `off` and `0` as
"false".
- 'int': canonicalize values as simple decimal numbers. An optional suffix of
Expand Down
Loading