|
33 | 33 | #include "commit-reach.h"
|
34 | 34 | #include "rebase-interactive.h"
|
35 | 35 | #include "reset.h"
|
| 36 | +#include "merge-strategies.h" |
36 | 37 |
|
37 | 38 | #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
|
38 | 39 |
|
@@ -2008,9 +2009,15 @@ static int do_pick_commit(struct repository *r,
|
2008 | 2009 |
|
2009 | 2010 | commit_list_insert(base, &common);
|
2010 | 2011 | commit_list_insert(next, &remotes);
|
2011 |
| - res |= try_merge_command(r, opts->strategy, |
2012 |
| - opts->xopts_nr, (const char **)opts->xopts, |
2013 |
| - common, oid_to_hex(&head), remotes); |
| 2012 | + |
| 2013 | + if (!strcmp(opts->strategy, "resolve")) { |
| 2014 | + repo_read_index(r); |
| 2015 | + res |= merge_strategies_resolve(r, common, oid_to_hex(&head), remotes); |
| 2016 | + } else |
| 2017 | + res |= try_merge_command(r, opts->strategy, |
| 2018 | + opts->xopts_nr, (const char **)opts->xopts, |
| 2019 | + common, oid_to_hex(&head), remotes); |
| 2020 | + |
2014 | 2021 | free_commit_list(common);
|
2015 | 2022 | free_commit_list(remotes);
|
2016 | 2023 | }
|
|
0 commit comments