Code

git-gui: Correct toggling of added/untracked status for new files.
authorShawn O. Pearce <spearce@spearce.org>
Sun, 19 Nov 2006 06:20:42 +0000 (01:20 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 19 Nov 2006 06:20:42 +0000 (01:20 -0500)
commit51cc47fedaaea46a556aac7d4e32683abca1b57b
tree30480910a9644befa4deb776884cfbaa1abb7fc6
parent0d5709cf88e9f242e0e31ccbda42a1c827c90a22
git-gui: Correct toggling of added/untracked status for new files.

New files also lack index data from diff-files therefore we cannot use
their diff-files index data when we update-index.  Instead we can use
the fact that Git has them hardcoded as "0 0{40}" and do the same thing
ourselves.  This way you can toggle an untracked file into added status
and back out to untracked.

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