Closed GoogleCodeExporter closed 9 years ago
In 1.99.43, I removed the attempts to guess how to quote executable names, as
various flavors of windows made that impossible to do consistently or
correctly. That means you'll need to set the path correctly for your system by
setting VCSCommandGitExec to the appropriate value.
Having git in the PATH should be enough. Could you please verify whether it
is? It certainly couldn't have worked in .42 without having git in the PATH,
so it's possible you missed something.
Original comment by bob.hies...@gmail.com
on 9 Apr 2013 at 3:20
Well, it is embarrassing, but I found that I set VCSCommandGitExec in my _vimrc
:). So one mystery is solved.
But it does not help in 1.99.46. Originally I had this line there:
let VCSCommandGitExec='C:\Program Files\Git\bin\git.exe'
which I changed now to more sophisticated:
if executable($ProgramFiles . '\Git\bin\git.exe')
let g:VCSCommandGitExec= $ProgramFiles . '\Git\bin\git.exe'
endif
but the behavior is same. Works in 1.99.42 and fails in 1.99.43
Original comment by richard....@gmail.com
on 9 Apr 2013 at 3:43
What is the value of $ProgramFiles?
You may want to set it (for instance):
let g:VCSCommanditExec='c:\Program^ Files\Git\bin\git.exe'
The problem is that windows does fun things with quotes if they appear at the
beginning of a command line, which is where they go when I (naively) quote the
executable name.
I don't know if the ^ trick works with Windows XP. Please let me know.
Original comment by bob.hies...@gmail.com
on 9 Apr 2013 at 4:32
Oops, that should be:
let g:VCSCommandGitExec='c:\Program^ Files\Git\bin\git.exe'
Original comment by bob.hies...@gmail.com
on 9 Apr 2013 at 9:33
$ProgramFiles == 'C:\Program Files'
Using the string with caret you propose breaks it also in 1.99.42 (1.99.46
never works).
When it works in 1.99.42
g:VCSCommandGitExec == 'C:\Program Files\Git\bin\git.exe'
Original comment by richard....@gmail.com
on 10 Apr 2013 at 4:11
No string will work for .42 and later than .42, as the handling of that string
changed.
Next thing to try: please change the line in your vimrc to:
let g:VCSCommandGitExec= '"' . $ProgramFiles . '\Git\bin\git.exe"'
While that handling caused problems previously, it might help your setup.
Original comment by bob.hies...@gmail.com
on 10 Apr 2013 at 9:02
Changing the assignment will give:
VCSCommandGitExec "C:\Program Files\Git\bin\git.exe"
But this will not work neither in .42 nor in .43.
Probably I should clarify my previous reply, when I wrote
g:VCSCommandGitExec == 'C:\Program Files\Git\bin\git.exe'
The value, which works at least in .42, is precisely
:let g:VCSCommandGitExec
g:VCSCommandGitExec C:\Program Files\Git\bin\git.exe
(i.e. now quotes)
Original comment by richard....@gmail.com
on 11 Apr 2013 at 5:00
Can you please capture the error that occurs with the new setting (that
includes quotes)?
Original comment by bob.hies...@gmail.com
on 11 Apr 2013 at 6:08
Do you have a C:\Program Files\Git\cmd\git.exe as well? What happens if you
use it instead?
This is unfortunately hard for me to track down. The simplest solution would
be to ensure that git is on your path, because then you don't have to do
anything, except remove the g:VCSCommandGitExec variable.
So far, I haven't been able to break msysGit on Windows 7, 32 bit. I don't
have an XP environment in which to test, though.
Original comment by bob.hies...@gmail.com
on 11 Apr 2013 at 6:46
I believe I see part of what is happening. If you quote the value in
g:VCSCommandGitExec, the plugin fails the check it runs (using executable()).
If you don't quote, the command fails.
I have, temporarily at least, more or less reverted the change in .43 that
disables quoting. Please grab a copy at:
http://repo.or.cz/w/vcscommand.git/snapshot/7c95aa2c4597b6562ec82cb59154390f8db5
9c2f.zip
You should be able to use your original value of g:VCSCommandGitExec (the one
that is NOT quoted).
Original comment by bob.hies...@gmail.com
on 11 Apr 2013 at 7:42
The commit:
http://repo.or.cz/w/vcscommand.git/snapshot/7c95aa2c4597b6562ec82cb59154390f8db5
9c2f.zip
fixes it for me. Thanks!
Coming to you previous questions, I have already tried to put git.exe in PATH,
but it did not help. Otherwise git.exe works very well with cmd.exe, Git-bash
or TortoiseGit, so I guess it is really some specific of vim / vcscommand.
Original comment by richard....@gmail.com
on 12 Apr 2013 at 11:10
I hate windows quoting rules. I had removed the quoting in response to:
https://code.google.com/p/vcscommand/issues/detail?id=64&can=1
... but it seems that, since then, VIM has received a better default 'sxq' on
windows that may fix the issue they were seeing.
While I am still fairly certain that your PATH isn't what you think it is, I'll
put the quoting back in for executable names in the next release. On the
subject of PATH, did you verify from within VIM that the b:VCSCommandGitExec
was NOT set, and that:
:!git <blah>
worked? If the variable is set, then the PATH is ignored (strictly speaking,
that isn't true, as you could set the variable to a simple name with no slashes
and then PATH would still be searched).
Original comment by bob.hies...@gmail.com
on 12 Apr 2013 at 2:37
Original comment by bob.hies...@gmail.com
on 12 Apr 2013 at 2:58
Commenting on #12:
I do not have normally "C:\Program Files\Git\bin" in my PATH. I wrote I put it
there for the test if it helps with .46 but it did not. So I removed it.
So :!git for sure does not work.
If you suggest I have to set also my PATH in order to use the plugin then it is
another matter. But then what should I set to b:VCSCommandGitExec? (As it does
not work with "correct" value.)
Original comment by richard....@gmail.com
on 12 Apr 2013 at 3:06
If you set the PATH, you should NOT set VCSCommandGitExec at all. That
variable is provided to help in two cases:
1. Your executable is named something other than 'git'.
2. Your executable is not in the PATH.
Original comment by bob.hies...@gmail.com
on 12 Apr 2013 at 3:08
Adding "C:\Program Files\Git\bin" to the PATH and removing VCSCommandGitExec
fixes it even for .46. So I guess the problem only lies in handling of the
VCSCommandGitExec variable.
I was confused when I changed the PATH, but left VCSCommandGitExec defined,
which took precedence, so my attempts failed.
I would probably prefer to not have git directory in the path, but it is rather
cosmetic. I am not sure if it is worthy fixing as WinXP are clearly coming to
its end.
Original comment by richard....@gmail.com
on 12 Apr 2013 at 3:55
Thanks for checking, I don't like mysteries :)
If the quoting works, and right now it seems to, it is worth keeping in the
plugin. I removed it out of frustration with various flavors of windows but it
seems VIM has gotten a bit better with command quoting since then.
Original comment by bob.hies...@gmail.com
on 12 Apr 2013 at 3:58
This is released in 1.99.47.
Original comment by bob.hies...@gmail.com
on 13 Apr 2013 at 2:45
Original issue reported on code.google.com by
richard....@gmail.com
on 9 Apr 2013 at 2:50