blob: 06eb13cea630e21a27540314294d25003a732759 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
namespace LibGit2Sharp
{
/// <summary>
/// Options controlling Merge behavior.
/// </summary>
public sealed class MergeOptions
{
/// <summary>
/// Initializes a new instance of the <see cref="MergeOptions"/> class.
/// By default, a fast-forward merge will be performed if possible, and
/// if a merge commit is created, then it will be commited.
/// </summary>
public MergeOptions()
{
CommitOnSuccess = true;
}
/// <summary>
/// Commit the merge if the merge is successful and this is a non-fast-forward merge.
/// If this is a fast-forward merge, then there is no merge commit and this option
/// will not affect the merge.
/// </summary>
public bool CommitOnSuccess { get; set; }
/// <summary>
/// The type of merge to perform.
/// </summary>
public FastForwardStrategy FastForwardStrategy { get; set; }
}
/// <summary>
/// Strategy used for merging.
/// </summary>
public enum FastForwardStrategy
{
/// <summary>
/// Default fast-forward strategy. This will perform a fast-forward merge
/// if possible, otherwise will perform a non-fast-forward merge that
/// results in a merge commit.
/// </summary>
Default = 0,
/// <summary>
/// Do not fast-forward. Always creates a merge commit.
/// </summary>
NoFastFoward = 1, /* GIT_MERGE_NO_FASTFORWARD */
/// <summary>
/// Only perform fast-forward merges.
/// </summary>
FastForwardOnly = 2, /* GIT_MERGE_FASTFORWARD_ONLY */
}
}
|