Skip to content

conflicts: Introduce and use `conflictFilesWithGitMergeTree`

Karthik Nayak requested to merge revert-git-merge-tree into master

The current implementation of ListConflictFiles uses Git2Go to find the file conflicts, parses this data and returns the information to the client.

As part of the plan to move away from Git2Go, we introduce a new function conflictFilesWithGitMergeTree which uses git-merge-tree(1) to find the conflicted files. We then use this implementation behind the ListConflictFilesMergeTree featureflag.

Original MR: !5734 (merged) Reverted MR: !5840 (merged)

Changes from the previous revert: The revert was made because rails test was failing, this test was checking if there are conflicts between two commits which has different submodule commits within them.

While both the new and old implementations weren't finding conflicts. The new implementation was throwing a no conflict found error whenever there was no conflict, whereas the old implementation would silents fail (i.e. return no conflict files). I've modified the new implementation to do the same and also added a test for submodules.

Edited by Karthik Nayak

Merge request reports

Loading