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>
This commit is contained in:
parent
74d18d2edf
commit
dde5974ef1
5
git-gui
5
git-gui
@ -1022,6 +1022,8 @@ proc commit_committree {fd_wt curHEAD msg} {
|
|||||||
set s $file_states($path)
|
set s $file_states($path)
|
||||||
set m [lindex $s 0]
|
set m [lindex $s 0]
|
||||||
switch -glob -- $m {
|
switch -glob -- $m {
|
||||||
|
DD -
|
||||||
|
AO {set m __}
|
||||||
A? -
|
A? -
|
||||||
M? -
|
M? -
|
||||||
D? {set m _[string index $m 1]}
|
D? {set m _[string index $m 1]}
|
||||||
@ -1409,7 +1411,7 @@ proc write_update_index {fd pathList totalCnt batch msg after} {
|
|||||||
switch -glob -- [lindex $file_states($path) 0] {
|
switch -glob -- [lindex $file_states($path) 0] {
|
||||||
AD -
|
AD -
|
||||||
MD -
|
MD -
|
||||||
_D {set new D_}
|
_D {set new DD}
|
||||||
|
|
||||||
_M -
|
_M -
|
||||||
MM -
|
MM -
|
||||||
@ -2414,6 +2416,7 @@ proc toggle_or_diff {w x y} {
|
|||||||
A_ -
|
A_ -
|
||||||
AO -
|
AO -
|
||||||
M_ -
|
M_ -
|
||||||
|
DD -
|
||||||
D_ {
|
D_ {
|
||||||
update_indexinfo \
|
update_indexinfo \
|
||||||
"Removing [short_path $path] from commit" \
|
"Removing [short_path $path] from commit" \
|
||||||
|
Loading…
Reference in New Issue
Block a user