summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-15 22:53:53 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-17 23:56:15 -0500
commit306500fc09e7d8be042e8b9abbd9011b80b3300d (patch)
treeb0f3dec8fa11c083bb79fe94d14cfdc45f0695ef
parentgit-gui: Protect ourselves from funny GIT_DIR/working directory setups. (diff)
downloadtgif-306500fc09e7d8be042e8b9abbd9011b80b3300d.tar.xz
git-gui: Handle ' within paths when creating Windows shortcuts.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-gui b/git-gui
index c35c73c8c3..013f21b2e8 100755
--- 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'"