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

Re: git rebase --root bug

From
Taylor Blau <me@ttaylorr.com>
Date
May 11, 2023, 16:16 UTC
Message-ID
<ZF0U6tneDjLfGxf1@nand.local>
In-Reply-To
<288a9935-264b-4dc5-0d63-200c310f326e@gmail.com>
On Thu, May 11, 2023 at 03:21:11PM +0100, Phillip Wood wrote:
Show 7 quoted lines
> The cause of the problem is that --root creates an empty commit (known as
> "squash_onto" in the code) which it uses as the "onto" commit. When it picks
> the first commit in the todo list the "onto" commit is amended and so is
> unreachable when the reflog is expired above. I think the best fix would be
> to stop pretending that we have a real "onto" commit when --root is used
> without --onto and either store "new root" .git/rebase-merge/onto or not
> create that file at all.

Wouldn't it suffice to consider the squash_onto commit as reachable the same way we do for `--indexed-objects`?

Thanks, Taylor

Previous: Phillip WoodNext: Christopher Fretz
Message 5 of 7 in “git rebase --root bug”
  1. Christopher FretzMay 10, 2023
  2. Kristoffer HaugsbakkMay 10, 2023
  3. Christopher FretzMay 11, 2023
  4. Phillip WoodMay 11, 2023
  5. Taylor BlauMay 11, 2023
  6. Christopher FretzMay 11, 2023
  7. Phillip WoodMay 12, 2023

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.