-
Notifications
You must be signed in to change notification settings - Fork 892
/
Copy pathAfterRebaseStepInfo.cs
61 lines (54 loc) · 2.04 KB
/
AfterRebaseStepInfo.cs
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
55
56
57
58
59
60
61
namespace LibGit2Sharp
{
/// <summary>
/// Information about a rebase step that was just completed.
/// </summary>
public class AfterRebaseStepInfo
{
/// <summary>
/// Needed for mocking.
/// </summary>
protected AfterRebaseStepInfo()
{ }
internal AfterRebaseStepInfo(RebaseStepInfo stepInfo, Commit commit, long completedStepIndex, long totalStepCount)
{
StepInfo = stepInfo;
Commit = commit;
WasPatchAlreadyApplied = false;
CompletedStepIndex = completedStepIndex;
TotalStepCount = totalStepCount;
}
/// <summary>
/// Constructor to call when the patch has already been applied for this step.
/// </summary>
/// <param name="stepInfo"></param>
/// <param name="completedStepIndex"/>
/// <param name="totalStepCount"></param>
internal AfterRebaseStepInfo(RebaseStepInfo stepInfo, long completedStepIndex, long totalStepCount)
: this(stepInfo, null, completedStepIndex, totalStepCount)
{
WasPatchAlreadyApplied = true;
}
/// <summary>
/// The info on the completed step.
/// </summary>
public virtual RebaseStepInfo StepInfo { get; private set; }
/// <summary>
/// The commit generated by the step, if any.
/// </summary>
public virtual Commit Commit { get; private set; }
/// <summary>
/// Was the changes for this step already applied. If so,
/// <see cref="AfterRebaseStepInfo.Commit"/> will be null.
/// </summary>
public virtual bool WasPatchAlreadyApplied { get; private set; }
/// <summary>
/// The index of the step that was just completed.
/// </summary>
public virtual long CompletedStepIndex { get; private set; }
/// <summary>
/// The total number of steps in the rebase operation.
/// </summary>
public virtual long TotalStepCount { get; private set; }
}
}