Hi Phillip, On Fri, 12 Oct 2018, Phillip Wood wrote: > Hi Johannes > On 12/10/2018 09:35, Johannes Schindelin wrote: > > Hi Phillip, > > > > On Thu, 11 Oct 2018, Phillip Wood wrote: > > > >> I think this would be a useful addition to rebase, there's one small > >> comment below. > >> > >> On 10/10/2018 09:53, Johannes Schindelin via GitGitGadget wrote: > >>> From: Johannes Schindelin <johannes.schindelin@xxxxxx> > >>> > >>> The 'edit' command can be used to cherry-pick a commit and then > >>> immediately drop out of the interactive rebase, with exit code 0, to let > >>> the user amend the commit, or test it, or look around. > >>> > >>> Sometimes this functionality would come in handy *without* > >>> cherry-picking a commit, e.g. to interrupt the interactive rebase even > >>> before cherry-picking a commit, or immediately after an 'exec' or a > >>> 'merge'. > >>> > >>> This commit introduces that functionality, as the spanking new 'break' > >>> command. > >>> > >>> Suggested-by: Stefan Beller <sbeller@xxxxxxxxxx> > >>> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> > >>> --- > > >>> diff --git a/sequencer.c b/sequencer.c > >>> index 8dd6db5a01..b209f8af46 100644 > >>> --- a/sequencer.c > >>> +++ b/sequencer.c > > >>> @@ -3293,6 +3295,9 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts) > >>> unlink(rebase_path_stopped_sha()); > >>> unlink(rebase_path_amend()); > >>> delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF); > >>> + > >>> + if (item->command == TODO_BREAK) > >>> + break; > >> > >> Normally when rebase stops it prints a message to say where it has got > >> to and how to continue, it might be useful to do the same here > > > > That's a very valid point. I'll think of something. > > I'm not sure what gets left on the screen from the previous picks but > something to say what the last pick/exec was and maybe what the current > HEAD is would be useful I think. I first wanted to do that, imitating the "Stopped at <hex>... <oneline>" of an `edit` command, but it *is* now possible that we are on an unborn branch... which will look a bit funny, I guess, as we construct a very special place-holder commit to be HEAD in that case. > One thing has just occurred to me - what does git status say (and does > it still work - I'm not sure how much parsing it does on the todo and > done files) if it is run while rebase is stopped on a break command? I don't think it says anything special, really. It just reports that we're in the middle of a rebase, listing up to two already-processed and up to two to-be-processed todo commands. Ciao, Dscho