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: NShawn O. Pearce <spearce@spearce.org>
Showing
想要评论请 注册 或 登录