git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] git-gui: remove 'no such variable' for s error when encounter unknown file states

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Dec 9, 2010, 20:46 UTC
Message-ID
<ab91f8f7447c20f518554c57c4f85483cab4ee2f.1291927374.git.bert.wesarg@googlemail.com>
In-Reply-To
<c373e73fb114ebc580c36bc494dc62f80a19ece9.1291927374.git.bert.wesarg@googlemail.com>

$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>
---
 lib/commit.tcl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 7f459cd..83b3d9d 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -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? -
-- 
1.7.3.2.1200.ge4bf6
Previous: Bert WesargNext: Bert Wesarg
Message 2 of 4 in “git-gui: fix typo in image data”
  1. 1/3 git-gui: fix typo in image dataBert Wesarg, Dec 9, 2010
  2. 2/3 git-gui: remove 'no such variable' for s error when encounter unknown file statesBert Wesarg, Dec 9, 2010
  3. 3/3 git-gui: learn more type change statesBert Wesarg, Dec 9, 2010
  4. Pat ThoytsJan 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.