Example #1
0
    public ICommit?FindMergeBase(ICommit commit, ICommit otherCommit)
    {
        _ = commit.NotNull();
        _ = otherCommit.NotNull();

        var retryAction = new RetryAction <LockedFileException, ICommit?>();

        return(retryAction.Execute(() =>
        {
            var mergeBase = repositoryInstance.ObjectDatabase.FindMergeBase((Commit)commit, (Commit)otherCommit);
            return mergeBase == null ? null : new Commit(mergeBase);
        }));
    }
Example #2
0
    public ICommit?FindMergeBase(ICommit commit, ICommit otherCommit)
    {
        commit      = commit.NotNull();
        otherCommit = otherCommit.NotNull();

        var retryAction = new RetryAction <LockedFileException, ICommit?>();

        return(retryAction.Execute(() =>
        {
            var first = (Commit)commit;
            var second = (Commit)otherCommit;
            var mergeBase = RepositoryInstance.ObjectDatabase.FindMergeBase(first, second);
            return mergeBase == null ? null : new Commit(mergeBase);
        }));
    }