@matheusbsbs / matheus-bagliano / commits / 118d938812
Fork 0

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>

Shawn O. Pearce committed Aug 26, 2009 at 17:39 UTC 118d938812f3fc660f43bad9b546e7dadc3571a9
1 file changed +2 -2
lib/diff.tcl
+2 -2
@@ -300,9 +300,9 @@ proc start_show_diff {cont_info {add_opts {}}} {
300 || [string match {160000 *} [lindex $s 3]]} {
301 set is_submodule_diff 1
302 if {$w eq $ui_index} {
303 - set cmd {submodule summary --cached -- $current_diff_path}
303 + set cmd [list submodule summary --cached -- $path]
304 } else {
305 - set cmd {submodule summary --files -- $current_diff_path}
305 + set cmd [list submodule summary --files -- $path]
306 }
307 }
308