Code

git-gui: Handle starting on mapped shares under Cygwin
authorShawn O. Pearce <spearce@spearce.org>
Fri, 21 Sep 2007 15:08:50 +0000 (11:08 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 22 Sep 2007 01:58:37 +0000 (21:58 -0400)
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>
git-gui.sh

index 10710e26c69a987fe2a712c1c146442525fefc05..62e165227633338cdc8deaede8cfd07ea6ddd804 100755 (executable)
@@ -305,7 +305,7 @@ proc _which {what} {
        global env _search_exe _search_path
 
        if {$_search_path eq {}} {
-               if {[is_Cygwin]} {
+               if {[is_Cygwin] && [regexp {^(/|\.:)} $env(PATH)]} {
                        set _search_path [split [exec cygpath \
                                --windows \
                                --path \