summaryrefslogtreecommitdiff
path: root/src/merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/merge.c')
-rw-r--r--src/merge.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/merge.c b/src/merge.c
index 2e40b6db8..69c42bc0c 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -2186,8 +2186,6 @@ static int merge_normalize_checkout_opts(
const git_merge_head **their_heads)
{
int error = 0;
- unsigned int default_checkout_strategy = GIT_CHECKOUT_SAFE_CREATE |
- GIT_CHECKOUT_ALLOW_CONFLICTS;
GIT_UNUSED(repo);
@@ -2195,12 +2193,12 @@ static int merge_normalize_checkout_opts(
memcpy(checkout_opts, given_checkout_opts, sizeof(git_checkout_options));
else {
git_checkout_options default_checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
+ default_checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE |
+ GIT_CHECKOUT_ALLOW_CONFLICTS;
+
memcpy(checkout_opts, &default_checkout_opts, sizeof(git_checkout_options));
}
- if (!checkout_opts->checkout_strategy)
- checkout_opts->checkout_strategy = default_checkout_strategy;
-
/* TODO: for multiple ancestors in merge-recursive, this is "merged common ancestors" */
if (!checkout_opts->ancestor_label) {
if (ancestor_head && ancestor_head->commit)