rbong / vim-flog

A blazingly fast, stunningly beautiful, exceptionally powerful git branch viewer for Vim/Neovim.
750 stars 22 forks source link

git worktree: certain commands cause plugin to crash #145

Closed heytrav closed 1 week ago

heytrav commented 1 week ago

Follow up from #144 .

After recent updates on master/main branch running :Flog now does bring up the git tree as before. However there are a couple issues that I encountered:

rbong commented 1 week ago

Thanks for reporting.

Sorry, I am having problems recreating this. Is the repo this is happening in open source, or are you able to provide a minimal setup (git commands that create a repo structure with this issue)?

heytrav commented 1 week ago

I have my repos checked out as bare clones in a specific directory:

mkdir bare 
mkdir code

cd bare
git clone --bare <some github repo>

cd some-repo.git/

git worktree add --checkout ~/code/project/main  main

cd ~/code/project/main
nvim README.md

:Flog 
# In the Flog viewport
a   # viewport goes blank

or

:Flog
:Floggit fetch # viewport crashes and message is displayed: fatal: not a git repository...

For this example I was using traefik-helm-chart repo, but it's behaved the same for others that I have from our internal git repositories as well.

rbong commented 1 week ago

Thanks again for reporting, I pushed some changes that should handle this case. Please let me know if there are any more issues.