Example #1
0
        public BranchComparison(CommitDiffCount branch, CommitDiffCount other)
        {
            Branch = branch;
            Other  = other;

            if (branch.DiffCount == 0 && other.DiffCount == 0)
            {// both have NO "extra" commits
                State = BranchCompareStatus.Same;
            }
            else if (other.DiffCount == 0)
            {// (control has extra commits AND) other has NO extra commits
                State = BranchCompareStatus.AheadPublishable;
            }
            else if (branch.DiffCount == 0)
            {// (other has extra commits AND) control has NO extra commits
                State = BranchCompareStatus.BehindFastForwardable;
            }
            else
            {// (both have extra commits)
                State = BranchCompareStatus.Diverged;
            }
        }
        public BranchComparison(CommitDiffCount branch, CommitDiffCount other)
        {
            Branch = branch;
            Other = other;

            if (branch.DiffCount == 0 && other.DiffCount == 0)
            {// both have NO "extra" commits
                State = BranchCompareStatus.Same;
            }
            else if (other.DiffCount == 0)
            {// (control has extra commits AND) other has NO extra commits
                State = BranchCompareStatus.AheadPublishable;
            }
            else if (branch.DiffCount == 0)
            {// (other has extra commits AND) control has NO extra commits
                State = BranchCompareStatus.BehindFastForwardable;
            }
            else
            {// (both have extra commits)
                State = BranchCompareStatus.Diverged;
            }
        }