Skip to content

fix(git): special case for git rebase -i --root for early commit#577

Open
ButterSus wants to merge 1 commit intosindrets:mainfrom
ButterSus:fix/git-rebase-root-issue
Open

fix(git): special case for git rebase -i --root for early commit#577
ButterSus wants to merge 1 commit intosindrets:mainfrom
ButterSus:fix/git-rebase-root-issue

Conversation

@ButterSus
Copy link

Fixes #576

@lgruen-vcgs
Copy link

Thanks so much, @ButterSus! I ran into this issue as well and your fix worked great. Any chance this could get merged?

dlyongemallo pushed a commit to dlyongemallo/diffview.nvim that referenced this pull request Feb 4, 2026
When running `git rebase -i --root`, the initial commit has no parent,
so `git merge-base` fails. Instead of crashing with an assertion error,
gracefully handle this by using the empty tree SHA as the base.

Fixes sindrets#576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] DiffviewOpen crashes during rebase -i --root when git merge-base fails

2 participants