Code

git-gui: Correct disappearing unstaged files.
authorShawn O. Pearce <spearce@spearce.org>
Sun, 21 Jan 2007 18:25:06 +0000 (13:25 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 22 Jan 2007 03:47:54 +0000 (22:47 -0500)
A prior commit tried to use the old index state for the old working
directory state during a UI refresh of a file.  This caused files
which were being unstaged (and thus becoming unmodified) to drop
out of the working directory side of the display, at least until
the user performed a rescan to force the UI to redisplay everything.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh

index c4d77fafe73436b8e390a12310b4d3f65eff927f..aa8f0ba067a0bdb041fc854be3ebf9eb0f7c0f84 100755 (executable)
@@ -1336,7 +1336,7 @@ proc display_file {path state} {
        if {[string index $old_m 0] eq {U}} {
                set o U
        } else {
-               set o [string index $old_m 0]
+               set o [string index $old_m 1]
        }
        if {[string index $new_m 0] eq {U}} {
                set n U