From: Jens Lehmann Date: Mon, 7 Dec 2009 20:35:59 +0000 (+0100) Subject: git-gui: Correct file_states when unstaging partly staged entry X-Git-Tag: v1.7.0-rc0~3^2^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7ec2b69f1ad54db0acee165701c769de33f5ba13;p=git.git git-gui: Correct file_states when unstaging partly staged entry 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 but kept its old value. This seems not to have had any bad effects but diminishes the value of the file_states list for future enhancements. Signed-off-by: Jens Lehmann Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index 211494587..e3473a81a 100755 --- a/git-gui.sh +++ b/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 \