Re: [PATCH] rebase: mention --abort alongside --continue
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Jun 18, 2026, 18:49 UTC
- Message-ID
- <CAHwyqnV8je6gCTExr=CFCdYskN1dVaEDVSKDLUo5A4Ukv=qhiA@mail.gmail.com>
- In-Reply-To
- <xmqqo6h9z7e6.fsf@gitster.g>
Just an example when working on a different topic:
I rebased with -x to run all the tests, but ran a test that didn't exist yet on the first commit and ended up in a bad state. Here it should clearly show the 'git rebase --abort', so I can start over, it's not something to fix:
``` $ git rebase --keep-base -x 'make -s' -x 'cd t && prove -j8 t3454-history-squash.sh t3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh t3450-history.sh' Executing: make -s GIT_VERSION=2.55.0.rc1.20.g1e31474ef6 Executing: cd t && prove -j8 t3454-history-squash.sh t3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh t3450-history.sh Cannot detect source of 't3454-history-squash.sh'! at /System/Library/Perl/5.34/TAP/Parser/IteratorFactory.pm line 256. ... warning: execution failed: cd t && prove -j8 t3454-history-squash.sh t3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh t3450-history.sh You can fix the problem, and then run
git rebase --continue
$ git status interactive rebase in progress; onto 95e20213fa Last commands done (3 commands done): exec make -s exec cd t && prove -j8 t3454-history-squash.sh t3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh t3450-history.sh (see more in file .git/rebase-merge/done) Next commands to do (9 remaining commands): pick 498da64046 # history: give commit_tree_ext a message template exec make -s (use "git rebase --edit-todo" to view and edit) You are currently editing a commit while rebasing branch 'rebase-fixup-fold' on '95e20213fa'. (use "git commit --amend" to amend the current commit) (use "git rebase --continue" once you are satisfied with your changes)
nothing to commit, working tree clean ```
Harald
On Wed, Jun 17, 2026 at 2:19 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> > Phillip Wood <phillip.wood123@gmail.com> writes: > > >> It is very true that users who know what they are doing and got into > >> such conflicts are opted to go into such a situation tnat it is > >> unlikely that they would appreciate a choice to abort. > > > > That's not quite what I was trying to say which was that aborting in the > > case of conflicts is more likely than in the case of a failed exec. > > Ah, I misread the intention. And I agree with you that "failed > test" case is very likely to lead to "further changes/amends" and > not "aborted rebase". > > > So if I've understood we'd print a message explaining what's happened > > and how to continue followed by a hint about aborting. The message would > > depend on what problem caused the rebase to stop, but the hint would be > > the same in each case. That sounds fine to me. > > Yeah, and "failed test" would not be one of the problem that would > invite the hint to "abort". I am OK with that, too. FWIW, I am OK > if the "you can abort" hint cannot be configured away, either ;-) >