Reduce complexity of GitRepository.merge() method