replay: use stuck form in documentation and help message
gitcli(7) suggests to use stuck form. Change the documentation strings to use this form. While at it, reorder them to match the order in the docs. Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Toon Claes committed
Apr 1, 2026 at 22:55 UTC
6542cacbb33490ab83ef87a5fbee694cd2863bdd
2 files changed
+15
-14
Documentation/git-replay.adoc
+13
-12
@@ -9,7 +9,8 @@ git-replay - EXPERIMENTAL: Replay commits on a new base, works with bare repos t
9
SYNOPSIS
10
--------
11
[verse]
12
-(EXPERIMENTAL!) 'git replay' ([--contained] --onto <newbase> | --advance <branch> | --revert <branch>) [--ref-action[=<mode>]] <revision-range>
12
+(EXPERIMENTAL!) 'git replay' ([--contained] --onto=<newbase> | --advance=<branch> | --revert=<branch>)
13
+ [--ref-action=<mode>] <revision-range>
14
15
DESCRIPTION
16
-----------
@@ -26,7 +27,7 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
27
OPTIONS
28
-------
29
29
---onto <newbase>::
30
+--onto=<newbase>::
31
Starting point at which to create the new commits. May be any
32
valid commit, and not just an existing branch name.
33
+
@@ -34,7 +35,7 @@ When `--onto` is specified, the branch(es) in the revision range will be
35
updated to point at the new commits, similar to the way `git rebase --update-refs`
36
updates multiple branches in the affected range.
37
37
---advance <branch>::
38
+--advance=<branch>::
39
Starting point at which to create the new commits; must be a
40
branch name.
41
+
@@ -42,7 +43,7 @@ The history is replayed on top of the <branch> and <branch> is updated to
43
point at the tip of the resulting history. This is different from `--onto`,
44
which uses the target only as a starting point without updating it.
45
45
---revert <branch>::
46
+--revert=<branch>::
47
Starting point at which to create the reverted commits; must be a
48
branch name.
49
+
@@ -79,8 +80,8 @@ The default mode can be configured via the `replay.refAction` configuration vari
80
81
<revision-range>::
82
Range of commits to replay; see "Specifying Ranges" in
82
- linkgit:git-rev-parse[1]. In `--advance <branch>` or
83
- `--revert <branch>` mode, the range should have a single tip,
83
+ linkgit:git-rev-parse[1]. In `--advance=<branch>` or
84
+ `--revert=<branch>` mode, the range should have a single tip,
85
so that it's clear to which tip the advanced or reverted
86
<branch> should point. Any commits in the range whose changes
87
are already present in the branch the commits are being
@@ -127,7 +128,7 @@ EXAMPLES
128
To simply rebase `mybranch` onto `target`:
129
130
------------
130
-$ git replay --onto target origin/main..mybranch
131
+$ git replay --onto=target origin/main..mybranch
132
------------
133
134
The refs are updated atomically and no output is produced on success.
@@ -135,14 +136,14 @@ The refs are updated atomically and no output is produced on success.
136
To see what would be updated without actually updating:
137
138
------------
138
-$ git replay --ref-action=print --onto target origin/main..mybranch
139
+$ git replay --ref-action=print --onto=target origin/main..mybranch
140
update refs/heads/mybranch ${NEW_mybranch_HASH} ${OLD_mybranch_HASH}
141
------------
142
143
To cherry-pick the commits from mybranch onto target:
144
145
------------
145
-$ git replay --advance target origin/main..mybranch
146
+$ git replay --advance=target origin/main..mybranch
147
------------
148
149
Note that the first two examples replay the exact same commits and on
@@ -154,7 +155,7 @@ What if you have a stack of branches, one depending upon another, and
155
you'd really like to rebase the whole set?
156
157
------------
157
-$ git replay --contained --onto origin/main origin/main..tipbranch
158
+$ git replay --contained --onto=origin/main origin/main..tipbranch
159
------------
160
161
All three branches (`branch1`, `branch2`, and `tipbranch`) are updated
@@ -165,7 +166,7 @@ commits to replay using the syntax `A..B`; any range expression will
166
do:
167
168
------------
168
-$ git replay --onto origin/main ^base branch1 branch2 branch3
169
+$ git replay --onto=origin/main ^base branch1 branch2 branch3
170
------------
171
172
This will simultaneously rebase `branch1`, `branch2`, and `branch3`,
@@ -176,7 +177,7 @@ that they have in common, but that does not need to be the case.
177
To revert commits on a branch:
178
179
------------
179
-$ git replay --revert main topic~2..topic
180
+$ git replay --revert=main topic~2..topic
181
------------
182
183
This reverts the last two commits from `topic`, creating revert commits on
builtin/replay.c
+2
-2
@@ -84,8 +84,8 @@ int cmd_replay(int argc,
84
85
const char *const replay_usage[] = {
86
N_("(EXPERIMENTAL!) git replay "
87
- "([--contained] --onto <newbase> | --advance <branch> | --revert <branch>) "
88
- "[--ref-action[=<mode>]] <revision-range>"),
87
+ "([--contained] --onto=<newbase> | --advance=<branch> | --revert=<branch>)\n"
88
+ "[--ref-action=<mode>] <revision-range>"),
89
NULL
90
};
91
struct option replay_options[] = {