git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase: write script before initializing state

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 9, 2025, 00:14 UTC
Message-ID
<xmqqfrf6qkyy.fsf@gitster.g>
In-Reply-To
<20250609221055.136074-1-oystwa@gmail.com>
Øystein Walle <oystwa@gmail.com> writes:
Show 32 quoted lines
> If rebase.instructionFormat is invalid the repository is left in a
> strange state when the interactive rebase fails. `git status` outputs
> boths the same as it would in the normal case *and* something related to
> interactive rebase:
>
>     $ git -c rebase.instructionFormat=blah rebase -i
>     fatal: invalid --pretty format: blah
>     $ git status
>     On branch master
>     Your branch is ahead of 'upstream/master' by 1 commit.
>       (use "git push" to publish your local commits)
>
>     git-rebase-todo is missing.
>     No commands done.
>     No commands remaining.
>     You are currently editing a commit while rebasing branch 'master' on '8db3019401'.
>       (use "git commit --amend" to amend the current commit)
>       (use "git rebase --continue" once you are satisfied with your changes)
>
> By attempting to write the rebase script before initializing the state
> this potential scenario is avoided.
> ---
> The diff looks perhaps more messy than required. The only required
> change is the filling in of make_script_args and the call to
> sequencer_make_script() above the call to init_basic_state(). But then
> the `if (ret)` looks out of place, and moving that up means adding `goto
> cleanup` which means the code that was previously the else case can be
> dedented.
>
> get_commit_format() calls die() in this case, so cleaning up the
> sequencer state isn't an option. Maybe it shouldn't call die in the
> first place, but that looks to be much larger change.

The patch has been stalled for a few weeks since Phillip's review comments. What's the status of this? Will we see a response and/or an updated patch sometime soon?

Thanks.
Previous: Phillip WoodNext: Øystein Walle
Message 4 of 8 in “rebase: write script before initializing state”
  1. rebase: write script before initializing stateØystein Walle, Jun 9, 2025
  2. Junio C HamanoJun 9, 2025
  3. Phillip WoodJun 10, 2025
  4. Junio C HamanoJul 9, 2025
  5. rebase: write script before initializing stateØystein Walle, Jul 11, 2025
  6. Junio C HamanoJul 11, 2025
  7. Phillip WoodJul 24, 2025
  8. Junio C HamanoJul 23, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.