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

Re: Bug, git rebase -i does not abort correctly

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 26, 2018, 09:24 UTC
Message-ID
<CACsJy8DjXBv_HMbRFPjCLuYt-bk=Ec3VPKorXJ_SBJN8pDu=PQ@mail.gmail.com>
In-Reply-To
<1516953056.8886.3.camel@gmail.com>

On Fri, Jan 26, 2018 at 2:50 PM, Kaartic Sivaraam <kaartic.sivaraam@gmail.com> wrote:

Show 18 quoted lines
> This might seem to be a bug as the comment in "git-rebase-todo" says,
>
>     However, if you remove everything, the rebase will be aborted.
>
> But "man git rebase" clearly says,
>
>     If <branch> is specified, git rebase will perform an automatic "git
>     checkout <branch>" before doing anything else. Otherwise it remains
>     on
>     the current branch.
>
> Junio has previously confirmed that "git rebase [-i] <upstream>
> <branch>" is just a short hand for "git checkout <branch> && git rebase
> [-i] <upstream>".[ref 1] So, it's not surprising that it left HEAD at
> @~3 when you completely removed the contents of git-rebase-todo and
> exited the editor.
>
> Does that help solve your issue?

Sort of. It smells bad design to me when a mistake can easily become a feature. But with your help, I think I should be able to disable this feature on my local build. Thanks.

-- 
Duy
Previous: Kaartic SivaraamNext: Kaartic Sivaraam
Message 3 of 4 in “Bug, git rebase -i does not abort correctly”
  1. Duy NguyenJan 25, 2018
  2. Kaartic SivaraamJan 26, 2018
  3. Duy NguyenJan 26, 2018
  4. Kaartic SivaraamMar 13, 2018

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.