using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LibGit2Sharp { /// /// Class to report the result of a revert. /// public class RevertResult { /// /// Needed for mocking purposes. /// protected RevertResult() { } internal RevertResult(RevertStatus status, Commit commit = null) { Commit = commit; Status = status; } /// /// The resulting commit of the revert. /// /// This will return null if the revert was not committed. /// This can happen if: /// 1) The revert resulted in conflicts. /// 2) The option to not commit on success is set. /// /// public virtual Commit Commit { get; private set; } /// /// The status of the revert. /// public virtual RevertStatus Status { get; private set; } } /// /// The status of what happened as a result of a revert. /// public enum RevertStatus { /// /// The commit was successfully reverted. /// Reverted, /// /// The revert resulted in conflicts. /// Conflicts, /// /// Revert was run, but there were no changes to commit. /// NothingToRevert, } }