From: Shawn O. Pearce Date: Sun, 21 Jan 2007 03:57:19 +0000 (-0500) Subject: git-gui: Correct DD file state to be only D_. X-Git-Tag: gitgui-0.6.0~122 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b4b2b8454bca8f0636260358e3a63b9097351fc1;p=git.git git-gui: Correct DD file state to be only D_. Apparently my earlier suspicion that the file state DD was a bug was correct. A file which has been deleted from the working directory and from the index will always get the state of D_ during a rescan. Thus the only valid state for this to have is D_. We should always use only D_ internally during our state changes. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index 9fa467ab9..9a2b70b47 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1104,7 +1104,7 @@ proc commit_committree {fd_wt curHEAD msg} { __ - A_ - M_ - - DD { + D_ { unset file_states($path) catch {unset selected_paths($path)} } @@ -1516,7 +1516,7 @@ proc write_update_index {fd pathList totalCnt batch msg after} { AD - MD - UD - - _D {set new DD} + _D {set new D_} _M - MM - @@ -1969,7 +1969,6 @@ foreach i { {AD "Added (but gone)"} {_D "Missing"} - {DD "Removed by commit"} {D_ "Removed by commit"} {DO "Removed (still exists)"} {DM "Removed (but modified)"} @@ -2872,7 +2871,7 @@ proc toggle_or_diff {w x y} { switch -glob -- [lindex $file_states($path) 0] { A_ - M_ - - DD - + D_ - DO - DM { update_indexinfo \