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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Jan 25, 2023 at 04:03 UTC 925360041ca192b5dd052e5c4dceba1418e6678c
1 file changed +33 -28
Documentation/git-rebase.txt
+33 -28
@@ -208,6 +208,39 @@ Alternatively, you can undo the 'git rebase' with
208
209 git rebase --abort
210
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 +
244 OPTIONS
245 -------
246 --onto <newbase>::
@@ -249,22 +282,6 @@ See also INCOMPATIBLE OPTIONS below.
282 <branch>::
283 Working branch; defaults to `HEAD`.
284
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 -
285 --apply::
286 Use applying strategies to rebase (calling `git-am`
287 internally). This option may become a no-op in the future
@@ -345,17 +362,6 @@ See also INCOMPATIBLE OPTIONS below.
362 +
363 See also INCOMPATIBLE OPTIONS below.
364
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 -
365 -m::
366 --merge::
367 Using merging strategies to rebase (default).
@@ -651,7 +657,6 @@ are incompatible with the following options:
657 * --no-keep-empty
658 * --empty=
659 * --[no-]reapply-cherry-picks when used without --keep-base
654 - * --edit-todo
660 * --update-refs
661 * --root when used without --onto
662