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