git-gui: Correct toggling of deleted file status.
There was a bug with the way we handled deleted file status. A file really shouldn't be in D_ state when it has been deleted, instead it is really DD. Therefore we should have toggled _D to DD, not D_, thereby letting us toggle back to _D. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Nov 19, 2006 at 00:46 UTC
dde5974ef109ed3aadfbac4d233899fb04d1c9ff
1 file changed
+4
-1
git-gui
+4
-1
@@ -1022,6 +1022,8 @@ proc commit_committree {fd_wt curHEAD msg} {
1022
set s $file_states($path)
1023
set m [lindex $s 0]
1024
switch -glob -- $m {
1025
+ DD -
1026
+ AO {set m __}
1027
A? -
1028
M? -
1029
D? {set m _[string index $m 1]}
@@ -1409,7 +1411,7 @@ proc write_update_index {fd pathList totalCnt batch msg after} {
1411
switch -glob -- [lindex $file_states($path) 0] {
1412
AD -
1413
MD -
1412
- _D {set new D_}
1414
+ _D {set new DD}
1415
1416
_M -
1417
MM -
@@ -2414,6 +2416,7 @@ proc toggle_or_diff {w x y} {
2416
A_ -
2417
AO -
2418
M_ -
2419
+ DD -
2420
D_ {
2421
update_indexinfo \
2422
"Removing [short_path $path] from commit" \