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

Re: Supporting --no-edit for git rebase --continue

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Feb 9, 2024, 16:16 UTC
Message-ID
<fbf859ca-43f4-433e-b111-377aa60f1947@gmail.com>
In-Reply-To
<CAGHpTB+mCxvzJ4LDpQrMgHmzigUzcAnRcwMewV0oYKM2HwbNXw@mail.gmail.com>
Hi Orgad
On 07/02/2024 20:46, Orgad Shaneh wrote:
Show 8 quoted lines
> Hi,
> 
> Is it possible to add --no-edit for git rebase --continue, similar to
> the functionality of this flag for git cherry-pick --continue and
> similar commands?
> 
> This should continue the rebase without activating the commit message
> editor, and just keep the existing message.

I think being able to say "git rebase --continue --no-edit" to stop rebase prompting for a commit message when resolving a conflict would be useful but it would need to be careful that it did not suppress the editor for "reword", "squash", or "fixup" commands. You can use an alias that only runs the editor if HEAD has changed since the rebase was continued to do this

     git config alias.rbc-no-edit '!
         no_edit_head=$(git show-ref -s --verify HEAD) &&
         real_editor="$(git var GIT_EDITOR)" &&
         GIT_EDITOR="test \"\$(git show-ref -s --verify HEAD)\" = \"$no_edit_head\" || \
             $real_editor" git rebase --continue'
Best Wishes
Phillip
Previous: Orgad Shaneh
Message 4 of 4 in “Supporting --no-edit for git rebase --continue”
  1. Orgad ShanehFeb 7, 2024
  2. brian m. carlsonFeb 9, 2024
  3. Orgad ShanehFeb 9, 2024
  4. Phillip WoodFeb 9, 2024

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.