Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
checkout: do not lose staged removal
[gitweb.git]
/
builtin-checkout.c
diff --git
a/builtin-checkout.c
b/builtin-checkout.c
index f6f8f086de980b5bc19ca59985a2b0d8201831d9..774f29992a967201d1d4f39e6d2a9993d11a8eb7 100644
(file)
--- a/
builtin-checkout.c
+++ b/
builtin-checkout.c
@@
-242,6
+242,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;