@matheusbsbs / matheus-bagliano / commits / 299077fb40
Fork 0

git-gui: Handle starting on mapped shares under Cygwin

I really cannot explain Cygwin's behavior here but if we start git-gui through Cygwin on a local drive it appears that Cygwin is leaving $env(PATH) in Unix style, even if it started a native (non-Cygwin) Tcl/Tk process to run git-gui. Yet starting that same git-gui and Tcl/Tk combination through Cygwin on a network share causes it to automatically convert $env(PATH) into Windows style, which broke our internal "which" implementation. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Sep 21, 2007 at 11:08 UTC 299077fb40eac1e128b7bc09d5d992960e6f11c2
1 file changed +1 -1
git-gui.sh
+1 -1
@@ -305,7 +305,7 @@ proc _which {what} {
305 global env _search_exe _search_path
306
307 if {$_search_path eq {}} {
308 - if {[is_Cygwin]} {
308 + if {[is_Cygwin] && [regexp {^(/|\.:)} $env(PATH)]} {
309 set _search_path [split [exec cygpath \
310 --windows \
311 --path \