[RFC,v1,15/17] merge: use the "octopus" strategy without forking
diff mbox series

Message ID 20200625121953.16991-16-alban.gruin@gmail.com
State New
Headers show
  • Rewrite the remaining merge strategies from shell to C
Related show

Commit Message

Alban Gruin June 25, 2020, 12:19 p.m. UTC
This teaches `git merge' to invoke the "octopus" strategy with a
function call instead of forking.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
 builtin/merge.c | 3 +++
 1 file changed, 3 insertions(+)

diff mbox series

diff --git a/builtin/merge.c b/builtin/merge.c
index d50b4ad6ad..53f64ddb87 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -748,6 +748,9 @@  static int try_merge_strategy(const char *strategy, struct commit_list *common,
 	} else if (!strcmp(strategy, "resolve"))
 		return merge_strategies_resolve(the_repository, common,
 						head_arg, remoteheads);
+	else if (!strcmp(strategy, "octopus"))
+		return merge_strategies_octopus(the_repository, common,
+						head_arg, remoteheads);
 	else {
 		return try_merge_command(the_repository,
 					 strategy, xopts_nr, xopts,