Class GitCompareMergeTester


  • public class GitCompareMergeTester
    extends Object
    Runs compare/merge on Git commits.
    • Constructor Detail

      • GitCompareMergeTester

        public GitCompareMergeTester()
    • Method Detail

      • compareAndMergeTwoCommits

        public void compareAndMergeTwoCommits​(Path repoPath,
                                              String mainCommitId,
                                              String otherCommitId,
                                              Supplier<IV8Project> v8ProjectSupplier,
                                              ICompareMergeResultChecker resultChecker)
                                       throws Exception
        Runs comparison and merging of two specified commits in the given repository. Note, that for successful comparison and merging it is also required to provide actual V8 project to be merged built on the main commit Id. The provided supplier can build the project at the moment of calling because it is called just after switching to the main commit Id.
        Parameters:
        repoPath - the path to the repository, cannot be null
        mainCommitId - the main commit Id, cannot be null or empty
        otherCommitId - the other commit Id, cannot be null or empty
        v8ProjectSupplier - the supplier of v8 project built on the main commit Id, cannot be null
        resultChecker - the external checker of compare/merge results, cannot be null
        Throws:
        Exception - if some problem occurred