read-tree --reset: update working tree file for conflicted paths.
authorJunio C Hamano <junkio@cox.net>
Sat, 3 Jun 2006 08:49:31 +0000 (01:49 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 4 Jun 2006 06:57:41 +0000 (23:57 -0700)
commitb0d6e64629aeba96e837972c0fda5e61eebb7ab1
tree757aeb64c42ad07018eceade7cfe4163645678ea
parentbf41bf2db71ac4bb03248bb0fe18cbb718af497a
read-tree --reset: update working tree file for conflicted paths.

The earlier "git reset --hard" simplification stopped removing
leftover working tree files from a failed automerge, when
switching back to the HEAD version that does not have the
paths.

This patch, instead of removing the unmerged paths from the
index, drops them down to stage#0 but marks them with mode=0
(the same "to be deleted" marker we internally use for paths
deleted by the merge).  one_way_merge() function and the
functions it calls already know what to do with them -- if the
tree we are reading has the path the working tree file is
overwritten, and if it doesn't the working tree file is
removed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-read-tree.c