Open ansonos opened 4 months ago
This is impossible to debug without a repo that can reliably reproduce it. I see that there are some strange errors in the log:
fatal: path '' is in the index, but not at stage 2
hint: Did you mean ':1:'?
Were there perhaps some files with some strange paths? How was the conflict produced (merge / rebase / stash apply / cherry-pick / ...other)?
So, this is out of memory; I first noticed this issue when merging (maybe rebased) two branches which both moved (created/deleted) files. So my guess is that that's the reason that there is no path for some files of the merge.
I'll try to use this plugin more again to see if it happens again and try to add more details.
In my situation I had a feature branch (let's call it feature-1
) branched from main
that renamed a file. I then branched again from the feature branch (let's call this one feature-2
). I merged feature-1
into main
. Then I pulled latest main
and merged main
into feature-2
, this has conflicts and is the point where I'm getting this error with DiffviewOpen
.
[Diffview.nvim] Failed to create diff buffer: ':2:path/to/file/that/was/renamed/FormerName.ts'
VS Code's source control pane shows it in "Merge Changes" as FormerName.ts
being "Conflict: both deleted" and if I click "Open File" it says "The editor could not be opened because the file was not found." And it shows the new name for the file as "Conflict: Both added," and I can open the file.
What I need is something like i.e. a shell script that can recreate a git repo with the relevant problematic state. Either that, or just share an archive of a repo with the problematic state.
Description
Using
DiffviewOpen
results in an immediate crash when using it on a repository that has outstanding merge conflicts in files.Expected behavior
DiffviewOpen shows merge conflicts.
Actual behavior
DiffviewOpen results in an error and no conflicts are shown.
Steps to reproduce
Couldn't provoke/reproduce it - repository can't be shared unfortunately. ~But it seems to need files that have been deleted on at least one side.~
Health check
Output of
:checkhealth diffview
Log info
Relevant info from
:DiffviewLog
messages
Neovim version
Operating system and version
Linux 6.7.4-200.fc39.x86_64 x86_64 GNU/Linux
Minimal config