Re: [PATCH] rebase -i: do not update "done" when rescheduling command
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 27, 2023, 07:04 UTC
- Message-ID
- <f05deb00-1bcd-9e05-739f-6a30d6d8cf3b@gmx.de>
- In-Reply-To
- <pull.1492.git.1679237337683.gitgitgadget@gmail.com>
Hi Phillip,
On Sun, 19 Mar 2023, Phillip Wood via GitGitGadget wrote:
Show 22 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > As the sequencer executes todo commands it appends them to > .git/rebase-merge/done. This file is used by "git status" to show the > recently executed commands. Unfortunately when a command is rescheduled > the command preceding it is erroneously appended to the "done" file. > This means that when rebase stops after rescheduling "pick B" the "done" > file contains > > pick A > pick B > pick A > > instead of > > pick A > pick B > > Fix this by not updating the "done" file when adding a rescheduled > command back into the "todo" file. A couple of the existing tests are > modified to improve their coverage as none of them trigger this bug or > check the "done" file.
I am purposefully not yet focusing on the patch, as I have a concern about the reasoning above.
When a command fails that needs to be rescheduled, I actually _like_ that there is a record in `done` about said command. It is very much like a `pick` that failed (but was not rescheduled) and was then `--skip`ed: it still shows up on `done`.
I do understand the concern that the rescheduled command now shows up in both `done` and `git-rebase-todo` (which is very different from the failed `pick` command that would show up _only_ in `git-rebase-todo`). So maybe we can find some compromise, e.g. adding a commented-out line to `done` à la:
# rescheduled: pick A
What do you think?
Ciao, Johannes