diff options
author | Russell Belfer <rb@github.com> | 2014-04-24 16:20:08 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-24 16:20:08 -0700 |
commit | af9eeac93929bdf10c30e60f34717959d83b6bd3 (patch) | |
tree | 6e4d258f6529d6cb6f9d739eee8305c8912c933b /src | |
parent | 87c9b741dfc5be7edc43625c84720841b65cd14e (diff) | |
parent | a4e2c36a66eca49ae4d7bdf0fdba8d4b3c900ab9 (diff) | |
download | libgit2-af9eeac93929bdf10c30e60f34717959d83b6bd3.tar.gz |
Merge pull request #2294 from ethomson/merge_checkout_strategy
Merge checkout strategy
Diffstat (limited to 'src')
-rw-r--r-- | src/merge.c | 8 |
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) |