Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
checkout: Fix "initial checkout" detection
[gitweb.git]
/
builtin-checkout.c
diff --git
a/builtin-checkout.c
b/builtin-checkout.c
index 05eee4ecc71d7a20d9faf59c849d3c693ae4cc8d..25845cdd5e6ed47a726b4be57929b9ec4d348fff 100644
(file)
--- a/
builtin-checkout.c
+++ b/
builtin-checkout.c
@@
-269,8
+269,7
@@
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.initial_checkout = is_cache_unborn();
topts.update = 1;
topts.merge = 1;
topts.gently = opts->merge;