Skip to content
Snippets Groups Projects
Commit b80ce510 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

conversationrepository: avoid recursive merge

There is no need as we always merge two branches so we can avoid
a lot of recursive operations. Moreover, this seems to cause some
weird locks

To be honest I'm not sure about the usage of this argument, doc is
still a bit unclear:

    Maximum number of times to merge common ancestors to build a
    virtual merge base when faced with criss-cross merges.
    When this limit is reached, the next ancestor will simply be used
    instead of attempting to merge it. The default is unlimited.

GitLab: #871
Change-Id: I9c22208626e7f6ff489e91b72a580238a6137499
parent 49c8e204
Branches
No related tags found
No related merge requests found
......@@ -3230,6 +3230,7 @@ ConversationRepository::merge(const std::string& merge_id, bool force)
git_merge_options merge_opts;
git_merge_options_init(&merge_opts, GIT_MERGE_OPTIONS_VERSION);
merge_opts.recursion_limit = 2;
git_index* index_ptr = nullptr;
if (git_merge_commits(&index_ptr, repo.get(), head_commit.get(), other_commit.get(), &merge_opts)
< 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment