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

[PATCH 1/2] git-gui: Unstaging a partly staged entry didn't update file_states correctly

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jan 2, 2010, 16:58 UTC
Message-ID
<4B3F7B2F.8020701@web.de>
In-Reply-To
<4B3F7AE2.10007@web.de>

When unstaging a partly staged file or submodule, the file_states list was not updated properly (unless unstaged linewise). Its index_info part did not contain the former head_info as it should have.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
 git-gui/git-gui.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 718277a..e0dd5b5 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -1613,6 +1613,9 @@ proc merge_state {path new_state {head_info {}} {index_info {}}} {
 	} elseif {$s0 ne {_} && [string index $state 0] eq {_}
 		&& $head_info eq {}} {
 		set head_info $index_info
+	} elseif {$s0 eq {_} && [string index $state 0] ne {_}} {
+		set index_info $head_info
+		set head_info {}
 	}

 	set file_states($path) [list $s0$s1 $icon \
-- 
1.6.6.339.g7cacc
Previous: Jens LehmannNext: Jens Lehmann
Message 2 of 4 in “git-gui: Add a special diff popup menu for submodules”
  1. 0/2 git-gui: Add a special diff popup menu for submodulesJens Lehmann, Jan 2, 2010
  2. 1/2 git-gui: Unstaging a partly staged entry didn't update file_states correctlyJens Lehmann, Jan 2, 2010
  3. 2/2 git-gui: Add a special diff popup menu for submodulesJens Lehmann, Jan 2, 2010
  4. Shawn O. PearceJan 23, 2010

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.