nvim-blame-line icon indicating copy to clipboard operation
nvim-blame-line copied to clipboard

Fix blaming inside git worktrees

Open fedemengo opened this issue 3 years ago • 0 comments

This closes #17. I already tested it on my end, please let me know if there are problems

The problem with worktree was cause by a mismatch between file and git object paths.

Without worktrees we have a git object some/file at path/to/repo/.git/some/file. By dropping the last dir here and here we get the correct file path path/to/repo/some/file.

With worktrees we have an additional dir path/to/repo/.git/worktrees/<worktree-name>/some/file, the fix follows from that.

fedemengo avatar May 14 '22 08:05 fedemengo