git-gui: Worked around environment variable problems on Windows.
authorShawn O. Pearce <spearce@spearce.org>
Tue, 7 Nov 2006 04:47:05 +0000 (23:47 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 7 Nov 2006 08:05:17 +0000 (03:05 -0500)
commitcc4b1c0213ad2d99121135125b8c2ea630bebe3d
treeb6819b03df126f92758f5ab66228ca0e9acd8c48
parent8c0ce436826f01e17cba90ebcaf6483ad3b8c984
git-gui: Worked around environment variable problems on Windows.

Apparently the Cygwin tclsh/wish executables don't pass the environment
that they inherited onto any children that they invoke.  This causes a
problem for some users during 'git fetch' or 'git push' as critical
environment variables like GIT_SSH and SSH_AUTH_SOCK aren't available
to the git processes.

So we work around this by forcing sh to start a login shell, thus
reloading the user's environment, then cd to the current directory,
and finally start the requested process.  Of course this won't
correctly handle any transient environment variables that were
inherited but were not supplied by the user's login shell.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui