aboutsummaryrefslogtreecommitdiff
path: root/builtin-checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-09-18 19:53:22 -0700
committerJunio C Hamano <gitster@pobox.com>2008-09-18 19:53:22 -0700
commit2ba3d5d9bd47c42400049e81d0e1e94948112277 (patch)
treee02b4bf9c6fd25cdc8d46bc07234cc8451d188b8 /builtin-checkout.c
parent01409bbf75198289591ba9dfe2c8d2370b36a058 (diff)
parent5521883490e85f4d973141972cf16f89a79f1979 (diff)
downloadgit-2ba3d5d9bd47c42400049e81d0e1e94948112277.tar.gz
git-2ba3d5d9bd47c42400049e81d0e1e94948112277.tar.xz
Merge branch 'jc/maint-checkout-keep-remove' into maint
* jc/maint-checkout-keep-remove: checkout: do not lose staged removal
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 8e77767b4..08c6d8614 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -269,6 +269,8 @@ static int merge_working_tree(struct checkout_opts *opts,
}
/* 2-way merge to the new branch */
+ topts.initial_checkout = (!active_nr &&
+ (old->commit == new->commit));
topts.update = 1;
topts.merge = 1;
topts.gently = opts->merge;