namespace LibGit2Sharp { /// /// Options controlling the behavior of actions that use merge (merge /// proper, cherry-pick, revert) /// public abstract class MergeOptionsBase { /// /// Initializes a new instance of the class. /// The default behavior is to attempt to find renames. /// protected MergeOptionsBase() { FindRenames = true; RenameThreshold = 50; TargetLimit = 200; } /// /// Find renames. Default is true. /// public bool FindRenames { get; set; } /// /// Similarity to consider a file renamed. /// public int RenameThreshold; /// /// Maximum similarity sources to examine (overrides /// 'merge.renameLimit' config (default 200) /// public int TargetLimit; /// /// How to handle conflicts encountered during a merge. /// public MergeFileFavor MergeFileFavor { get; set; } } /// /// Enum specifying how merge should deal with conflicting regions /// of the files. /// public enum MergeFileFavor { /// /// When a region of a file is changed in both branches, a conflict /// will be recorded in the index so that the checkout operation can produce /// a merge file with conflict markers in the working directory. /// This is the default. /// Normal = 0, /// /// When a region of a file is changed in both branches, the file /// created in the index will contain the "ours" side of any conflicting /// region. The index will not record a conflict. /// Ours = 1, /// /// When a region of a file is changed in both branches, the file /// created in the index will contain the "theirs" side of any conflicting /// region. The index will not record a conflict. /// Theirs = 2, /// /// When a region of a file is changed in both branches, the file /// created in the index will contain each unique line from each side, /// which has the result of combining both files. The index will not /// record a conflict. /// Union = 3, } }