git-gui: Handle ' within paths when creating Windows shortcuts.
authorShawn O. Pearce <spearce@spearce.org>
Thu, 16 Nov 2006 03:53:53 +0000 (22:53 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 18 Nov 2006 04:56:15 +0000 (23:56 -0500)
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui

diff --git a/git-gui b/git-gui
index c35c73c8c3a603efb3ec8580e3bbea51721d8fb7..013f21b2e84283b3909a617d4aeabf9fcf72204a 100755 (executable)
--- a/git-gui
+++ b/git-gui
@@ -2049,6 +2049,8 @@ proc do_windows_shortcut {} {
                                        --unix \
                                        --absolute \
                                        $gitdir]
+                               regsub -all ' $me "'\\''" me
+                               regsub -all ' $gd "'\\''" gd
                                puts -nonewline $fd "\"$sh\" --login -c \""
                                puts -nonewline $fd "GIT_DIR='$gd'"
                                puts -nonewline $fd " '$me'"