@matheusbsbs / matheus-bagliano / commits / 6b0f3f4629
Fork 0

git-gui: Corrected behavior of deleted (but existing in HEAD) files.

Apparently I did not account for the D_ file state. This can occur when a file has been marked for deletion by deleting it from the index, and the file also does not exist in the working directory. Typically this happens when the user deletes the file, hits Rescan, then includes the missing file in the commit, then hits Rescan again. We don't find the file in the working directory but its been removed in the index, so the state becomes D_. This state should be identical with DD. I'm not entirely sure why DD occurs sometimes and D_ others, it would seem like D_ is the state that should be happening instead of DD, leading me to believe there is a quirk in git-gui's state manipulation code. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 20, 2007 at 18:50 UTC 6b0f3f46293e2f718054e9947e209c0344721a69
1 file changed +2
git-gui
+2
@@ -1429,6 +1429,7 @@ proc write_update_indexinfo {fd pathList totalCnt batch msg after} {
1429 switch -glob -- [lindex $s 0] {
1430 A? {set new _O}
1431 M? {set new _M}
1432 + D_ {set new _D}
1433 D? {set new _?}
1434 ?? {continue}
1435 }
@@ -1945,6 +1946,7 @@ foreach i {
1946
1947 {_D i question "Missing"}
1948 {DD i removed "Removed by commit"}
1949 + {D_ i removed "Removed by commit"}
1950 {DO i removed "Removed (still exists)"}
1951 {DM i removed "Removed (but modified)"}
1952