git-gui: remove 'no such variable' for s error when encounter unknown file states
authorBert Wesarg <bert.wesarg@googlemail.com>
Thu, 9 Dec 2010 20:46:22 +0000 (21:46 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 28 Jan 2011 00:16:46 +0000 (00:16 +0000)
$s will be referenced in the error message. Which was broken since
"git-gui: Automatically update-index all included files before commit"
(bbe3b3b, 2006-11-16).

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/commit.tcl

index 7f459cd5647f690a5e48ed7c29fc0d75eef89d0c..83b3d9d21b44d1f9c494e8b74f62cbdf2ac08ac1 100644 (file)
@@ -161,7 +161,8 @@ The rescan will be automatically started now.
        #
        set files_ready 0
        foreach path [array names file_states] {
-               switch -glob -- [lindex $file_states($path) 0] {
+               set s $file_states($path)
+               switch -glob -- [lindex $s 0] {
                _? {continue}
                A? -
                D? -