summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2009-08-27 00:39:45 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2009-08-27 00:42:50 (GMT)
commit118d938812f3fc660f43bad9b546e7dadc3571a9 (patch)
treec6d1760bca82e27957baa3cbdb93cd98d19af56e
parentaf413de47b8b285ffa489df14023180456986c05 (diff)
downloadgit-118d938812f3fc660f43bad9b546e7dadc3571a9.zip
git-118d938812f3fc660f43bad9b546e7dadc3571a9.tar.gz
git-118d938812f3fc660f43bad9b546e7dadc3571a9.tar.bz2
git-gui: Ensure submodule path is quoted properly
When quoting an arbitrary user string in Tcl, its better to use [list ...] than to use {...}, in case the user string has spaces or { embedded within it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--lib/diff.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index d593323..bd5d189 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -300,9 +300,9 @@ proc start_show_diff {cont_info {add_opts {}}} {
|| [string match {160000 *} [lindex $s 3]]} {
set is_submodule_diff 1
if {$w eq $ui_index} {
- set cmd {submodule summary --cached -- $current_diff_path}
+ set cmd [list submodule summary --cached -- $path]
} else {
- set cmd {submodule summary --files -- $current_diff_path}
+ set cmd [list submodule summary --files -- $path]
}
}