stable

Clone or download

Read-only

request #15077: Mergeability status detection crashes when the merge is massive

When the merge of a PR branch to the destination branch is big the detection of the mergeability might run out of memory if the merge is not fast forwadable. The detection of merge conflicts is done by computing the merge in memory and searching for a merge conflict marker. When the differences between the two branches is massive we might not be able to hold the result of `git merge-tree` in memory (at least not with the limits imposed to the PHP process) and the process will run out of memory. To solve that, this contribution directly searches the conflict marker in the subprocess without pulling back the whole merge result to PHP. Besides the memory saving this approach is likely also a bit faster. Change-Id: I76b5bb2133406f416962a60aba541cd5bb54fded

Modified Files

Name
M plugins/pullrequest/include/PullRequest/GitExec.php +8 −6 Go to diff View file
M plugins/pullrequest/include/PullRequest/PullRequestMerger.php +5 −7 Go to diff View file
M tools/rpm/tuleap.rhel6.spec +1 −1 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +1 −1 Go to diff View file