Skip to content

Commit

Permalink
git-gui: Ensure submodule path is quoted properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Aug 27, 2009
1 parent af413de commit 118d938
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/diff.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}

Expand Down

0 comments on commit 118d938

Please sign in to comment.