With the code in vimagit's master branch, I get the following error message:
magit can not find any git repository
make sure that current opened file or vim current directory points to a git repository
search paths:
.
/Users/apnargundkar
Error detected while processing function magit#show_magit:
line 27:
E605: Exception not caught: magit_not_in_git_repo
For code in next, the behaviour is slightly different. It gives a poorer error message and also opens a completely blank magit buffer (doesn't happen with master). The error message is:
Error detected while processing function magit#show_magit[61]..magit#git#set_top_dir[3]..magit#utils#chdir:
line 8:
E344: Can't find directory "fatal: Not a git repository (or any of the parent directories): .git/" in cdpath
E472: Command failed
Steps to reproduce
Open vim from a directory which is not part of a git repo and then open vimagit (<leader>M).
Environment
vim or nvim version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 30 2018 07:37:16)
git version
git version 2.15.1 (Apple Git-101)
current vimagit version or (or SHA1)
Master: 8c7c01298d2d2793f9aa81d370f0de88bf9c4625
Next: f32316dcc7e4de3751b9a1bb32555cb04a8c6029
Short description of the problem
With the code in vimagit's
master
branch, I get the following error message:I'm not quite familiar with the codebase yet, but here are my two cents. Changing https://github.com/jreybert/vimagit/blob/8c7c01298d2d2793f9aa81d370f0de88bf9c4625/plugin/magit.vim#L712 to a simple
return
not only silences the uncaught exception complaint (E605
) but also keeps the upper part of the helpful error message which originates from magit.==========================================================================
For code in
next
, the behaviour is slightly different. It gives a poorer error message and also opens a completely blank magit buffer (doesn't happen withmaster
). The error message is:Steps to reproduce
Open vim from a directory which is not part of a git repo and then open vimagit (
<leader>M
).Environment
vim
ornvim
version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 30 2018 07:37:16)git
version git version 2.15.1 (Apple Git-101)current vimagit version or (or SHA1) Master: 8c7c01298d2d2793f9aa81d370f0de88bf9c4625 Next: f32316dcc7e4de3751b9a1bb32555cb04a8c6029
OS macOS High Sierra Version 10.13.3
terminal or gvim iTerm2 + tmux
Thanks for the awesome plugin!