Skip to content

Commit 118d938

Browse files
committed
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 <[email protected]>
1 parent af413de commit 118d938

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/diff.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ proc start_show_diff {cont_info {add_opts {}}} {
300300
|| [string match {160000 *} [lindex $s 3]]} {
301301
set is_submodule_diff 1
302302
if {$w eq $ui_index} {
303-
set cmd {submodule summary --cached -- $current_diff_path}
303+
set cmd [list submodule summary --cached -- $path]
304304
} else {
305-
set cmd {submodule summary --files -- $current_diff_path}
305+
set cmd [list submodule summary --files -- $path]
306306
}
307307
}
308308

0 commit comments

Comments
 (0)