rhysd / git-messenger.vim

Vim and Neovim plugin to reveal the commit messages under the cursor
MIT License
1.34k stars 32 forks source link

Doesn't work on worktrees #84

Open etrnal70 opened 2 years ago

etrnal70 commented 2 years ago

When editing worktrees, to make git functionality working on neovim i usually use this env. variables

GIT_DIR=<bare-repo-location> GIT_WORK_TREE=<worktree-location> nvim <filename>

Git plugins like fugitive or gitsigns.nvim works fine. But on git-messenger, it shows error that current worktree-location is not a git directory

rockyzhang24 commented 2 years ago

Same issue here. @rhysd Could you please support to respect GIT_DIR and GIT_WORK_TREE env? Thank you very much.

rhysd commented 2 years ago

git-messenger.vim always gives git current directory through -C. I'm not sure, but it would be prioritized over the env vars.

This is difficult issue for me since I don't have the bare repository environment. I'd appreciate if someone provides how to make the minimal environment to reproduce this issue.