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

Re: [PATCH 0/1] rebase: add --[no-]edit to --continue

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2026, 18:04 UTC
Message-ID
<xmqqldb4xlqa.fsf@gitster.g>
In-Reply-To
<20260721140443.1809379-1-hugo@hsal.es>
Hugo Sales <hugo@hsal.es> writes:
Show 8 quoted lines
> When a rebase stops for conflicts and the user runs `git rebase --continue`, the
> merge backend opens $EDITOR so the commit message can be revised. That is often
> useful, but not always: sometimes the user only wants to keep the message that
> is already there.
>
> This series adds:
>
> - `git rebase --continue --no-edit` to commit without opening an editor
Meh. "GIT_SEQUENCE_EDITOR=: git rebase --continue" is your friend ;-)
> - `rebase.noEdit` to make that the default on continue
> - `git rebase --continue --edit` to override `rebase.noEdit`

The new 'rebase.noEdit' configuration is especially concerning. It encourages users to assume by default that their rebase sessions will not produce notable changes worth recording in the commit logs.

A few immediate edge cases come to mind:
 - What if 'rebase -i' stops to give control back to the user for
   reasons other than a merge conflict?  If the user chose 'edit',
   their original intent was to modify both the commit message and
   the content.  With 'rebase.noEdit' enabled, would they now have
   to remember to pass '--edit' when continuing?  Does the answer
   depend on whether the 'edit' step resulted in a merge conflict?
 - What if the user chose 'reword', which is an explicit signal to
   update the commit message, but 'rebase.noEdit' is enabled?  If
   the rebase does not stop with a conflict, it might open the
   editor regardless of the configuration.  But if a conflict does
   occur and requires manual resolution, will the user still need to
   remember to pass '--edit' when continuing?

The proposed tests only cover the code path where control returns to the user due to a conflict. This is understandable since that scenario was your primary motivation. However, they do not verify what happens when there are no conflicts but the user explicitly intended to edit the message from the start. You may want to expand the test coverage to address these scenarios (and potentially others, as this is not an exhaustive list).

Thanks.
Previous: Hugo SalesNext: Phillip Wood
Message 3 of 5 in “rebase: add --[no-]edit to --continue”
  1. 0/1 rebase: add --[no-]edit to --continueHugo Sales, Jul 21, 2026
  2. 1/1 rebase: add --[no-]edit to --continueHugo Sales, Jul 21, 2026
  3. Junio C HamanoJul 21, 2026
  4. Phillip WoodJul 22, 2026
  5. Junio C HamanoJul 22, 2026

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.