Skip to content

Commit 9253600

Browse files
newrengitster
authored andcommitted
rebase: clarify the OPT_CMDMODE incompatibilities
--edit-todo was documented as being incompatible with any of the options for the apply backend. However, it is also incompatible with any of the options for the merge backend, and is incompatible with any options that are not backend specific as well. The same can be said for --continue, --skip, --abort, --quit, etc. This is already somewhat implicitly covered by the synopsis, but since "[<options>]" in the first two variants are vague it might be easy to miss this. That might not be a big deal, but since the rebase manpage has to spend so much verbiage about incompatibility of options, making a separate section for these options that are incompatible with everything else seems clearer. Do that, and remove the needless inclusion of --edit-todo in the explicit incompatibility list. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 796abac commit 9253600

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

Documentation/git-rebase.txt

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,39 @@ Alternatively, you can undo the 'git rebase' with
208208

209209
git rebase --abort
210210

211+
MODE OPTIONS
212+
------------
213+
214+
The options in this section cannot be used with any other option,
215+
including not with each other:
216+
217+
--continue::
218+
Restart the rebasing process after having resolved a merge conflict.
219+
220+
--skip::
221+
Restart the rebasing process by skipping the current patch.
222+
223+
--abort::
224+
Abort the rebase operation and reset HEAD to the original
225+
branch. If `<branch>` was provided when the rebase operation was
226+
started, then `HEAD` will be reset to `<branch>`. Otherwise `HEAD`
227+
will be reset to where it was when the rebase operation was
228+
started.
229+
230+
--quit::
231+
Abort the rebase operation but `HEAD` is not reset back to the
232+
original branch. The index and working tree are also left
233+
unchanged as a result. If a temporary stash entry was created
234+
using `--autostash`, it will be saved to the stash list.
235+
236+
--edit-todo::
237+
Edit the todo list during an interactive rebase.
238+
239+
--show-current-patch::
240+
Show the current patch in an interactive rebase or when rebase
241+
is stopped because of conflicts. This is the equivalent of
242+
`git show REBASE_HEAD`.
243+
211244
OPTIONS
212245
-------
213246
--onto <newbase>::
@@ -249,22 +282,6 @@ See also INCOMPATIBLE OPTIONS below.
249282
<branch>::
250283
Working branch; defaults to `HEAD`.
251284

252-
--continue::
253-
Restart the rebasing process after having resolved a merge conflict.
254-
255-
--abort::
256-
Abort the rebase operation and reset HEAD to the original
257-
branch. If `<branch>` was provided when the rebase operation was
258-
started, then `HEAD` will be reset to `<branch>`. Otherwise `HEAD`
259-
will be reset to where it was when the rebase operation was
260-
started.
261-
262-
--quit::
263-
Abort the rebase operation but `HEAD` is not reset back to the
264-
original branch. The index and working tree are also left
265-
unchanged as a result. If a temporary stash entry was created
266-
using `--autostash`, it will be saved to the stash list.
267-
268285
--apply::
269286
Use applying strategies to rebase (calling `git-am`
270287
internally). This option may become a no-op in the future
@@ -345,17 +362,6 @@ See also INCOMPATIBLE OPTIONS below.
345362
+
346363
See also INCOMPATIBLE OPTIONS below.
347364

348-
--skip::
349-
Restart the rebasing process by skipping the current patch.
350-
351-
--edit-todo::
352-
Edit the todo list during an interactive rebase.
353-
354-
--show-current-patch::
355-
Show the current patch in an interactive rebase or when rebase
356-
is stopped because of conflicts. This is the equivalent of
357-
`git show REBASE_HEAD`.
358-
359365
-m::
360366
--merge::
361367
Using merging strategies to rebase (default).
@@ -651,7 +657,6 @@ are incompatible with the following options:
651657
* --no-keep-empty
652658
* --empty=
653659
* --[no-]reapply-cherry-picks when used without --keep-base
654-
* --edit-todo
655660
* --update-refs
656661
* --root when used without --onto
657662

0 commit comments

Comments
 (0)