{"thread":{"id":"21894","subject":"[PATCH] git-gui: Unstaging a partly staged entry didn't update file_states correctly","startedAt":"2009-12-07T20:35:59Z","lastAt":"2010-01-23T22:43:53Z","messageCount":2,"participants":["Jens Lehmann","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"129446","messageId":"4B1D672F.3030805@web.de","threadId":"21894","inReplyTo":null,"subject":"[PATCH] git-gui: Unstaging a partly staged entry didn't update file_states correctly","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-12-07T20:35:59Z","receivedAt":"2009-12-07T20:35:59Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"When unstaging a partly staged file or submodule, the file_states list\nwas not updated properly (unless unstaged linewise). Its index_info part\ndid not contain the former head_info as it should have but kept its old\nvalue.\n\nThis seems not to have had any bad effects but diminishes the value of\nthe file_states list for future enhancements.\n\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n\nI noticed this while whipping up another - soon to be released - patch\nwhere the file_states list is used to access the hash values of staged\nand unstaged changes.\n\nAFAICS this buglet did not have negative effects until now because the\nindex_info hash value is not used.\n\n\n git-gui/git-gui.sh |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex 037a1f2..9495789 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -1613,6 +1613,9 @@ proc merge_state {path new_state {head_info {}} {index_info {}}} {\n \t} elseif {$s0 ne {_} && [string index $state 0] eq {_}\n \t\t&& $head_info eq {}} {\n \t\tset head_info $index_info\n+\t} elseif {$s0 eq {_} && [string index $state 0] ne {_}} {\n+\t\tset index_info $head_info\n+\t\tset head_info {}\n \t}\n\n \tset file_states($path) [list $s0$s1 $icon \\\n-- \n1.6.6.rc1.245.gcec33.dirty\n"},{"id":"132514","messageId":"20100123224353.GE12679@spearce.org","threadId":"21894","inReplyTo":"4B1D672F.3030805@web.de","subject":"Re: [PATCH] git-gui: Unstaging a partly staged entry didn't update file_states correctly","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-01-23T22:43:53Z","receivedAt":"2010-01-23T22:43:53Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> wrote:\n> When unstaging a partly staged file or submodule, the file_states list\n> was not updated properly (unless unstaged linewise). Its index_info part\n> did not contain the former head_info as it should have but kept its old\n> value.\n> \n> This seems not to have had any bad effects but diminishes the value of\n> the file_states list for future enhancements.\n> \n> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n> ---\n\nThanks, applied.\n\n-- \nShawn.\n"}]}