Commit 71ae7601 by Russell Belfer

Force explicit remove of files instead of defer

The checkout code used to defer removal of "blocking" files in
checkouts until the blocked item was actually being written (since
we have already checked that the removing the block is acceptable
according to the update rules).  Unfortunately, this resulted in
an intermediate index state where both the blocking and new items
were in the index which is no longer allowed.  Now we just remove
the blocking item in the first pass so it never needs to coexist.

In cases where there are typechanges, this could result in a bit
more churn of removing and recreating intermediate directories,
but I'm going to assume that is an unusual case and the churn will
not be too costly.
parent 0972c592
......@@ -246,6 +246,8 @@ static int checkout_action_no_wd(
*action = CHECKOUT_ACTION_IF(SAFE, UPDATE_BLOB, NONE);
break;
case GIT_DELTA_DELETED: /* case 8 or 25 */
*action = CHECKOUT_ACTION__REMOVE;
break;
default: /* impossible */
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment