* [PATCH 1/4] doc: link to config for git-replay(1)
2026-05-21 18:01 [PATCH 0/4] doc: replay: fix config link kristofferhaugsbakk
@ 2026-05-21 18:01 ` kristofferhaugsbakk
2026-05-30 22:18 ` Junio C Hamano
2026-05-21 18:01 ` [PATCH 2/4] doc: replay: simplify replay.refAction description kristofferhaugsbakk
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: kristofferhaugsbakk @ 2026-05-21 18:01 UTC (permalink / raw)
To: git; +Cc: Kristoffer Haugsbakk, Siddharth Asthana
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
This config doc was added in 336ac90c (replay: add replay.refAction
config option, 2025-11-06) but never included anywhere. Include it in
git-replay(1) and git-config(1).
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Documentation/config.adoc | 2 ++
Documentation/git-replay.adoc | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/Documentation/config.adoc b/Documentation/config.adoc
index 62eebe7c545..51fabecb9b0 100644
--- a/Documentation/config.adoc
+++ b/Documentation/config.adoc
@@ -511,6 +511,8 @@ include::config/remotes.adoc[]
include::config/repack.adoc[]
+include::config/replay.adoc[]
+
include::config/rerere.adoc[]
include::config/revert.adoc[]
diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
index a32f72aead3..f9ca2db2833 100644
--- a/Documentation/git-replay.adoc
+++ b/Documentation/git-replay.adoc
@@ -209,6 +209,10 @@ This replays the range `aabbcc..ddeeff` onto commit `112233` and updates
`refs/heads/mybranch` to point at the result. This can be useful when you want
to use bare commit IDs instead of branch names.
+CONFIGURATION
+-------------
+include::config/replay.adoc[]
+
GIT
---
Part of the linkgit:git[1] suite
--
2.54.0.13.g9c7419e39f8
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 1/4] doc: link to config for git-replay(1)
2026-05-21 18:01 ` [PATCH 1/4] doc: link to config for git-replay(1) kristofferhaugsbakk
@ 2026-05-30 22:18 ` Junio C Hamano
0 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2026-05-30 22:18 UTC (permalink / raw)
To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Siddharth Asthana
kristofferhaugsbakk@fastmail.com writes:
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> This config doc was added in 336ac90c (replay: add replay.refAction
> config option, 2025-11-06) but never included anywhere. Include it in
> git-replay(1) and git-config(1).
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---
> Documentation/config.adoc | 2 ++
> Documentation/git-replay.adoc | 4 ++++
> 2 files changed, 6 insertions(+)
It is always nice to see documentation gaps filled.
The `replay.refAction` configuration variable was indeed left
dangling without a proper link from the main command documentation,
which is embarrassing. I wonder if we can add simple "doc-lint"
rule or two to prevent similar mistakes from happening again?
> diff --git a/Documentation/config.adoc b/Documentation/config.adoc
> index 62eebe7c545..51fabecb9b0 100644
> --- a/Documentation/config.adoc
> +++ b/Documentation/config.adoc
> @@ -511,6 +511,8 @@ include::config/remotes.adoc[]
>
> include::config/repack.adoc[]
>
> +include::config/replay.adoc[]
> +
> include::config/rerere.adoc[]
>
> include::config/revert.adoc[]
Placing `include::config/replay.adoc[]` in `config.adoc`
alphabetically between `repack` and `rerere` is correct, as the list
is alphabetical.
> diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
> index a32f72aead3..f9ca2db2833 100644
> --- a/Documentation/git-replay.adoc
> +++ b/Documentation/git-replay.adoc
> @@ -209,6 +209,10 @@ This replays the range `aabbcc..ddeeff` onto commit `112233` and updates
> `refs/heads/mybranch` to point at the result. This can be useful when you want
> to use bare commit IDs instead of branch names.
>
> +CONFIGURATION
> +-------------
> +include::config/replay.adoc[]
> +
Adding the `CONFIGURATION` section near the end of `git-replay.adoc`
is also the standard way we expose configuration variables to the
command's manual page.
Looking good.
> GIT
> ---
> Part of the linkgit:git[1] suite
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/4] doc: replay: simplify replay.refAction description
2026-05-21 18:01 [PATCH 0/4] doc: replay: fix config link kristofferhaugsbakk
2026-05-21 18:01 ` [PATCH 1/4] doc: link to config for git-replay(1) kristofferhaugsbakk
@ 2026-05-21 18:01 ` kristofferhaugsbakk
2026-05-30 22:29 ` Junio C Hamano
2026-05-30 22:37 ` Junio C Hamano
2026-05-21 18:02 ` [PATCH 3/4] doc: replay: use a nested definition list kristofferhaugsbakk
` (2 subsequent siblings)
4 siblings, 2 replies; 12+ messages in thread
From: kristofferhaugsbakk @ 2026-05-21 18:01 UTC (permalink / raw)
To: git; +Cc: Kristoffer Haugsbakk, Siddharth Asthana
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
We don’t need to list what each argument does since the documentation
for `--ref-action` does that. So let’s simplify the `replay.refAction`
description by referring to git-replay(1).
Also make sure to not self-link for the git-replay(1) inclusion.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Documentation/config/replay.adoc | 17 +++++++----------
Documentation/git-replay.adoc | 1 +
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/Documentation/config/replay.adoc b/Documentation/config/replay.adoc
index 7d549d2f0e5..42e521694d1 100644
--- a/Documentation/config/replay.adoc
+++ b/Documentation/config/replay.adoc
@@ -1,11 +1,8 @@
replay.refAction::
- Specifies the default mode for handling reference updates in
- `git replay`. The value can be:
-+
---
- * `update`: Update refs directly using an atomic transaction (default behavior).
- * `print`: Output update-ref commands for pipeline use.
---
-+
-This setting can be overridden with the `--ref-action` command-line option.
-When not configured, `git replay` defaults to `update` mode.
+ Specifies the default mode for handling reference updates. Either `update` or `print`.
+ifdef::git-replay[]
+See `--ref-action`.
+endif::git-replay[]
+ifndef::git-replay[]
+See `--ref-action` for linkgit:git-replay[1] for details.
+endif::git-replay[]
diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
index f9ca2db2833..4de85088d6c 100644
--- a/Documentation/git-replay.adoc
+++ b/Documentation/git-replay.adoc
@@ -211,6 +211,7 @@ to use bare commit IDs instead of branch names.
CONFIGURATION
-------------
+:git-replay: 1
include::config/replay.adoc[]
GIT
--
2.54.0.13.g9c7419e39f8
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 2/4] doc: replay: simplify replay.refAction description
2026-05-21 18:01 ` [PATCH 2/4] doc: replay: simplify replay.refAction description kristofferhaugsbakk
@ 2026-05-30 22:29 ` Junio C Hamano
2026-05-30 22:37 ` Junio C Hamano
1 sibling, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2026-05-30 22:29 UTC (permalink / raw)
To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Siddharth Asthana
kristofferhaugsbakk@fastmail.com writes:
> replay.refAction::
> - Specifies the default mode for handling reference updates in
> - `git replay`. The value can be:
> -+
> ---
> - * `update`: Update refs directly using an atomic transaction (default behavior).
> - * `print`: Output update-ref commands for pipeline use.
> ---
> -+
> -This setting can be overridden with the `--ref-action` command-line option.
> -When not configured, `git replay` defaults to `update` mode.
> + Specifies the default mode for handling reference updates. Either `update` or `print`.
> +ifdef::git-replay[]
> +See `--ref-action`.
> +endif::git-replay[]
> +ifndef::git-replay[]
> +See `--ref-action` for linkgit:git-replay[1] for details.
> +endif::git-replay[]
This makes it a bit roundabout for "git config --help" readers who
wanted to figure out what value to set to the configuration
variable, because the valid choices are no longer listed here.
Finding `--ref-action=<mode>` and its description in the other page
is straight-forward, so it may not be too bad, though.
> diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
> index f9ca2db2833..4de85088d6c 100644
> --- a/Documentation/git-replay.adoc
> +++ b/Documentation/git-replay.adoc
> @@ -211,6 +211,7 @@ to use bare commit IDs instead of branch names.
>
> CONFIGURATION
> -------------
> +:git-replay: 1
> include::config/replay.adoc[]
The use of conditional attributes (`ifdef::git-replay[]`) is a neat
and standard way to tailor the description depending on whether it
is read as part of `git-config(1)` or `git-replay(1)`. It correctly
points the reader to `--ref-action` in the latter case, and provides
a full `linkgit` reference in the former. Clean and correct.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] doc: replay: simplify replay.refAction description
2026-05-21 18:01 ` [PATCH 2/4] doc: replay: simplify replay.refAction description kristofferhaugsbakk
2026-05-30 22:29 ` Junio C Hamano
@ 2026-05-30 22:37 ` Junio C Hamano
2026-06-02 11:58 ` Kristoffer Haugsbakk
1 sibling, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2026-05-30 22:37 UTC (permalink / raw)
To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Siddharth Asthana
kristofferhaugsbakk@fastmail.com writes:
> replay.refAction::
> - Specifies the default mode for handling reference updates in
> - `git replay`. The value can be:
> -+
> ---
> - * `update`: Update refs directly using an atomic transaction (default behavior).
> - * `print`: Output update-ref commands for pipeline use.
> ---
> -+
> -This setting can be overridden with the `--ref-action` command-line option.
> -When not configured, `git replay` defaults to `update` mode.
> + Specifies the default mode for handling reference updates. Either `update` or `print`.
> +ifdef::git-replay[]
> +See `--ref-action`.
> +endif::git-replay[]
> +ifndef::git-replay[]
> +See `--ref-action` for linkgit:git-replay[1] for details.
> +endif::git-replay[]
This makes it a bit roundabout for "git config --help" readers who
wanted to figure out what value to set to the configuration
variable, because the valid choices are no longer listed here.
Finding `--ref-action=<mode>` and its description in the other page
is straight-forward, so it may not be too bad, though.
> diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
> index f9ca2db2833..4de85088d6c 100644
> --- a/Documentation/git-replay.adoc
> +++ b/Documentation/git-replay.adoc
> @@ -211,6 +211,7 @@ to use bare commit IDs instead of branch names.
>
> CONFIGURATION
> -------------
> +:git-replay: 1
> include::config/replay.adoc[]
The use of conditional attributes (`ifdef::git-replay[]`) is a neat
and standard way to tailor the description depending on whether it
is read as part of `git-config(1)` or `git-replay(1)`. It correctly
points the reader to `--ref-action` in the latter case, and provides
a full `linkgit` reference in the former. Clean and correct.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] doc: replay: simplify replay.refAction description
2026-05-30 22:37 ` Junio C Hamano
@ 2026-06-02 11:58 ` Kristoffer Haugsbakk
0 siblings, 0 replies; 12+ messages in thread
From: Kristoffer Haugsbakk @ 2026-06-02 11:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Siddharth Asthana
On Sun, May 31, 2026, at 00:37, Junio C Hamano wrote:
> kristofferhaugsbakk@fastmail.com writes:
>
>> replay.refAction::
>> - Specifies the default mode for handling reference updates in
>> - `git replay`. The value can be:
>> -+
>> ---
>> - * `update`: Update refs directly using an atomic transaction (default behavior).
>> - * `print`: Output update-ref commands for pipeline use.
>> ---
>> -+
>> -This setting can be overridden with the `--ref-action` command-line option.
>> -When not configured, `git replay` defaults to `update` mode.
>> + Specifies the default mode for handling reference updates. Either `update` or `print`.
>> +ifdef::git-replay[]
>> +See `--ref-action`.
>> +endif::git-replay[]
>> +ifndef::git-replay[]
>> +See `--ref-action` for linkgit:git-replay[1] for details.
>> +endif::git-replay[]
>
> This makes it a bit roundabout for "git config --help" readers who
> wanted to figure out what value to set to the configuration
> variable, because the valid choices are no longer listed here.
That’s a good point. My thought process at the time was
• This description list needs to be changed
• But I also need to change it on git-replay(1)...
• So why not just gesture towards git-replay(1)?
But now I see that this does make it slightly worse. Which is not worth
the saved effort.
I was thinking that a shared file which is included in the config and
git-replay(1) could be used. That file would just contain the definition
list. I could also duplicate it manually and leave a comment about
keeping them in synch. What do you think?
Assuming that they should be equal, which I think right now although I
haven’t started on the next version yet.
>
> Finding `--ref-action=<mode>` and its description in the other page
> is straight-forward, so it may not be too bad, though.
>
>> diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
>> index f9ca2db2833..4de85088d6c 100644
>> --- a/Documentation/git-replay.adoc
>> +++ b/Documentation/git-replay.adoc
>> @@ -211,6 +211,7 @@ to use bare commit IDs instead of branch names.
>>
>> CONFIGURATION
>> -------------
>> +:git-replay: 1
>> include::config/replay.adoc[]
>
> The use of conditional attributes (`ifdef::git-replay[]`) is a neat
> and standard way to tailor the description depending on whether it
> is read as part of `git-config(1)` or `git-replay(1)`. It correctly
> points the reader to `--ref-action` in the latter case, and provides
> a full `linkgit` reference in the former. Clean and correct.
Thanks for the thorough review.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/4] doc: replay: use a nested definition list
2026-05-21 18:01 [PATCH 0/4] doc: replay: fix config link kristofferhaugsbakk
2026-05-21 18:01 ` [PATCH 1/4] doc: link to config for git-replay(1) kristofferhaugsbakk
2026-05-21 18:01 ` [PATCH 2/4] doc: replay: simplify replay.refAction description kristofferhaugsbakk
@ 2026-05-21 18:02 ` kristofferhaugsbakk
2026-05-30 22:37 ` Junio C Hamano
2026-05-21 18:02 ` [PATCH 4/4] doc: replay: move “default” to the right-hand-side kristofferhaugsbakk
2026-05-30 22:18 ` [PATCH 0/4] doc: replay: fix config link Junio C Hamano
4 siblings, 1 reply; 12+ messages in thread
From: kristofferhaugsbakk @ 2026-05-21 18:02 UTC (permalink / raw)
To: git; +Cc: Kristoffer Haugsbakk, Siddharth Asthana
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
This bullet list for `--ref-action` introduces a term with a colon.
This is exactly what a definition list is, structurally. Let’s be
sylistically consistent and use the definition list markup construct.
We can reuse the `::` delimiter since we use an open block.
But for consistency use the typical nested definition list
delimiter, namely `;;`.
Also drop the harmless but unneeded indentation.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Documentation/git-replay.adoc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
index 4de85088d6c..b4fe43ec687 100644
--- a/Documentation/git-replay.adoc
+++ b/Documentation/git-replay.adoc
@@ -80,10 +80,10 @@ incompatible with `--contained` (which is a modifier for `--onto` only).
Control how references are updated. The mode can be:
+
--
- * `update` (default): Update refs directly using an atomic transaction.
- All refs are updated or none are (all-or-nothing behavior).
- * `print`: Output update-ref commands for pipeline use. This is the
- traditional behavior where output can be piped to `git update-ref --stdin`.
+`update` (default);; Update refs directly using an atomic transaction.
+ All refs are updated or none are (all-or-nothing behavior).
+`print`;; Output update-ref commands for pipeline use. This is the
+ traditional behavior where output can be piped to `git update-ref --stdin`.
--
+
The default mode can be configured via the `replay.refAction` configuration variable.
--
2.54.0.13.g9c7419e39f8
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] doc: replay: use a nested definition list
2026-05-21 18:02 ` [PATCH 3/4] doc: replay: use a nested definition list kristofferhaugsbakk
@ 2026-05-30 22:37 ` Junio C Hamano
0 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2026-05-30 22:37 UTC (permalink / raw)
To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Siddharth Asthana
kristofferhaugsbakk@fastmail.com writes:
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> This bullet list for `--ref-action` introduces a term with a colon.
> This is exactly what a definition list is, structurally. Let’s be
> sylistically consistent and use the definition list markup construct.
Makes sense.
> --
> - * `update` (default): Update refs directly using an atomic transaction.
> - All refs are updated or none are (all-or-nothing behavior).
> - * `print`: Output update-ref commands for pipeline use. This is the
> - traditional behavior where output can be piped to `git update-ref --stdin`.
> +`update` (default);; Update refs directly using an atomic transaction.
> + All refs are updated or none are (all-or-nothing behavior).
> +`print`;; Output update-ref commands for pipeline use. This is the
> + traditional behavior where output can be piped to `git update-ref --stdin`.
> --
> +
The transition from a bulleted list to a nested definition list
(`;;`) for the `--ref-action` modes indeed makes the document
structure much cleaner.
> The default mode can be configured via the `replay.refAction` configuration variable.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/4] doc: replay: move “default” to the right-hand-side
2026-05-21 18:01 [PATCH 0/4] doc: replay: fix config link kristofferhaugsbakk
` (2 preceding siblings ...)
2026-05-21 18:02 ` [PATCH 3/4] doc: replay: use a nested definition list kristofferhaugsbakk
@ 2026-05-21 18:02 ` kristofferhaugsbakk
2026-05-30 22:37 ` Junio C Hamano
2026-05-30 22:18 ` [PATCH 0/4] doc: replay: fix config link Junio C Hamano
4 siblings, 1 reply; 12+ messages in thread
From: kristofferhaugsbakk @ 2026-05-21 18:02 UTC (permalink / raw)
To: git; +Cc: Kristoffer Haugsbakk, Siddharth Asthana
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
This is now a definition list (see previous commit) and parentheticals
like this do not go on the left-hand-side. Moving it to the other side
makes it stand out just as much and is also more consistent with the
rest of the documentation.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
> do not go on the left-hand-side.
At least I haven’t seen it.
Documentation/git-replay.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
index b4fe43ec687..39ecc2e1876 100644
--- a/Documentation/git-replay.adoc
+++ b/Documentation/git-replay.adoc
@@ -80,7 +80,7 @@ incompatible with `--contained` (which is a modifier for `--onto` only).
Control how references are updated. The mode can be:
+
--
-`update` (default);; Update refs directly using an atomic transaction.
+`update`;; (default) Update refs directly using an atomic transaction.
All refs are updated or none are (all-or-nothing behavior).
`print`;; Output update-ref commands for pipeline use. This is the
traditional behavior where output can be piped to `git update-ref --stdin`.
--
2.54.0.13.g9c7419e39f8
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 4/4] doc: replay: move “default” to the right-hand-side
2026-05-21 18:02 ` [PATCH 4/4] doc: replay: move “default” to the right-hand-side kristofferhaugsbakk
@ 2026-05-30 22:37 ` Junio C Hamano
0 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2026-05-30 22:37 UTC (permalink / raw)
To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Siddharth Asthana
kristofferhaugsbakk@fastmail.com writes:
> -`update` (default);; Update refs directly using an atomic transaction.
> +`update`;; (default) Update refs directly using an atomic transaction.
This looks sensible. Nice.
> All refs are updated or none are (all-or-nothing behavior).
> `print`;; Output update-ref commands for pipeline use. This is the
> traditional behavior where output can be piped to `git update-ref --stdin`.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/4] doc: replay: fix config link
2026-05-21 18:01 [PATCH 0/4] doc: replay: fix config link kristofferhaugsbakk
` (3 preceding siblings ...)
2026-05-21 18:02 ` [PATCH 4/4] doc: replay: move “default” to the right-hand-side kristofferhaugsbakk
@ 2026-05-30 22:18 ` Junio C Hamano
4 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2026-05-30 22:18 UTC (permalink / raw)
To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Siddharth Asthana
kristofferhaugsbakk@fastmail.com writes:
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> [1/4] doc: link to config for git-replay(1)
> [2/4] doc: replay: simplify replay.refAction description
> [3/4] doc: replay: use a nested definition list
> [4/4] doc: replay: move “default” to the right-hand-side
It is always nice to see documentation gaps filled.
^ permalink raw reply [flat|nested] 12+ messages in thread