nvim-blame-line
nvim-blame-line copied to clipboard
Fix blaming inside git worktrees
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.