Closed gidgid closed 4 years ago
Check if there's a child git
process running.
Not sure if there are other ways to check this (I'll be happy to know if there are) but I tried the following and could not see any running git processes:
ps aux
ps -A
pstree
BTW, :Gdiff
doesn't seem to work at all (regardless if I'm in a middle of a merge conflict or not)
The same problem also happens on my mac so maybe this is some vim configuration problem?
You can use px auxf
to see if Vim has any child processes.
I'm assuming you meant ps auxf
Ran it and didn't see any vim child processes
Anything else I should check?
I kept digging into it and wanted to pour more information and it seems like all the diff capabilities suspend my vim (:Gdiff
or :Gdiffsplit
)
Does :Gsplit
fail the same way? It does essentially the same thing except it doesn't enable diff mode.
Just checked, :Gsplit
works fine.
I also tried using just vimdiff without Vim fugitive as a mergetool to resolve the merge conflict and it also works fine, so it seems like the problem is only with the different diff commands
You say this is happening during a merge conflict; does it happen outside of one? Does it happen on both :Gdiffsplit
and :Gdiffsplit!
?
All the different diff
command seem to not work for some reason. They don't work during a merge conflict or without a merge conflict
I also check Gdiffsplit!
which doesn't work as well
I have hanging Gdiff
on windows + Vim8 and I see continuous process spawning of git in process monitor.
@ezpuzz If there's any way you could figure out the arguments of that git process it could potentially narrow things down.
Other things to test:
:Gdiffsplit :0:%
:Gdiffsplit HEAD:%
:noautocmd Gdiffsplit
The first 2 commands (:Gdiffsplit :0:%
and :Gdiffsplit HEAD:%
) make my vim suspend but the last one does work (i.e. no suspend) - anything else I should check?
That strongly suggests to me another plugin or your vimrc has an autocommand that's hanging. Try disabling plugins and see if you can isolate it.
I'm using vim-plug and removed all the plugins except from fugitive & vim plug.
I ran :PlugClean
and verified no other plugins are in my vim plug directory
:Gdiff
keeps suspending though
Is there a way to make sure only fugitive is running?
I cleaned out my entire .vimrc
file and just left the plugins and now it works - so its probably something that is massed up with my configuration. I'll do a binary search and try and isolate the problem
Found it! apparently I had some old code in my .vimrc
related to some experiments I did with ctags a while back. Once I removed it, :Gdiff
is working again
Thanks a lot for your help - it is highly appreciated
I'm using Vim 8, Ubuntu 18.04 and zsh (oh-my-zsh) & vim plug When I open a file with a merge conflict and invoke
:Gdiff
vim suddenly hangs until I kill it using Ctrl + CI tried without success:
:set shell=bash
.gitconfig
Any ideas what I may have missed?