Commit 25babd02a4151f858a631314364fdca97180f2c5

Russell Belfer 2014-01-30T11:38:59

Fix checkout NONE to not remove file If you are checking out NONE, then don't remove.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/checkout.c b/src/checkout.c
index 5b1f6cd..72fe536 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -246,7 +246,7 @@ 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;
+		*action = CHECKOUT_ACTION_IF(SAFE, REMOVE, NONE);
 		break;
 	default: /* impossible */
 		break;