@matheusbsbs / matheus-bagliano / commits / bdadecbae5
Fork 0

git-gui: Work around odd cygpath bug on Windows.

There appears to be a bug on one of my test systems where cygpath with the --long-name option is generating a corrupt string that does not actually refer to sh.exe. This breaks any desktop icon created by git-gui as the executable we are trying to invoke does not exist. Since Cygwin is typically installed as C:\cygwin long path names is probably not actually necessary to link to the shell. I also added a small echo to the start of the icon script, as it can take one of my test systems several seconds to startup git-gui. This way the user knows we're starting git-gui, and was politely asked to wait for the action to complete. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 20, 2007 at 19:03 UTC bdadecbae5b9f7317994bf2f521bb15068823a1d
1 file changed +1 -1
git-gui
+1 -1
@@ -2742,7 +2742,6 @@ proc do_windows_shortcut {} {
2742 set sh [exec cygpath \
2743 --windows \
2744 --absolute \
2745 - --long-name \
2745 /bin/sh]
2746 set me [exec cygpath \
2747 --unix \
@@ -2754,6 +2753,7 @@ proc do_windows_shortcut {} {
2753 $gitdir]
2754 regsub -all ' $me "'\\''" me
2755 regsub -all ' $gd "'\\''" gd
2756 + puts $fd "@ECHO Starting git-gui... Please wait..."
2757 puts -nonewline $fd "\"$sh\" --login -c \""
2758 puts -nonewline $fd "GIT_DIR='$gd'"
2759 puts -nonewline $fd " '$me'"