sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

Can't resolve conflicts when cherry-picking #313

Closed c3n21 closed 1 year ago

c3n21 commented 1 year ago

Hi!

I've encountered this bug when you try to solve a conflict caused by a cherry-pick.

image

Here is how you can reproduce it:

First create a repo, here is the minimal repo to reproduce this bug

git init .
echo "initial content" > file
git status
git add file
git config user.email "test@email"
git config user.name "test@email"
git commit -m "initial commit"
git checkout -b test/cherry-pick
echo "cherry-pick content" >> file
git commit -m "cherry-pick commit"
git switch -
echo "master modified content" >> file
git add -u
git commit -m "new commit"
git cherry-pick test/cherry-pick

Now try to open file using NeoVim and run :DiffviewOpen and that error will be displayed

sindrets commented 1 year ago

Thanks for the report and detailed repro steps! Should be fixed in the latest commit.

c3n21 commented 1 year ago

Works like a charm, thanks!