namespace LibGit2Sharp
{
///
/// Class to report the result of a merge.
///
public class MergeResult
{
///
/// Needed for mocking purposes.
///
protected MergeResult()
{ }
internal MergeResult(MergeStatus status, Commit commit = null)
{
this.Status = status;
this.Commit = commit;
}
///
/// The status of the merge.
///
public virtual MergeStatus Status
{
get;
private set;
}
///
/// The resulting commit of the merge. For fast-forward merges, this is the
/// commit that merge was fast forwarded to.
/// This will return null
if the merge has been unsuccessful due to conflicts.
///
public virtual Commit Commit
{
get;
private set;
}
}
///
/// The status of what happened as a result of a merge.
///
public enum MergeStatus
{
///
/// Merge was up-to-date.
///
UpToDate,
///
/// Fast-forward merge.
///
FastForward,
///
/// Non-fast-forward merge.
///
NonFastForward,
///
/// Merge resulted in conflicts.
///
Conflicts,
}
}