diff --git a/builtin-checkout.c b/builtin-checkout.c
index 8e77767b49888aa2131088a810850dab7854594d..08c6d8614ae2b619f520616fecd45b24fd866732 100644 (file)
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
}
/* 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;