junkblocker / patchreview-vim

Vim/Neovim plugin for doing single, multi-patch or diff code reviews
http://www.vim.org/scripts/script.php?script_id=1563
108 stars 8 forks source link

Cannot work on worktree #13

Closed codable closed 7 years ago

codable commented 7 years ago

It doesn't work inside of an worktree.

Error detected while processing function patchreview#diff_review[55]..patchreview#get_patchfile_lines: line 6: E605: Exception not caught: File is not readable

junkblocker commented 7 years ago

A little more information would be useful. What command did you run? Was it in a top level directory in a version controlled worktree? And if it was in a git or other repo, please tell the name of that version control system.

codable commented 7 years ago
git worktree add ../another-worktree master
cd ../another-worktree

in this worktree, change something, then do according to the README.md

:DiffReview git diff master --no-color -U5
junkblocker commented 7 years ago

Ah, worktrees are not something I had played with. Will add support as time permits. patches are welcome if somebody wants to take a shot at it before I do.