-
Notifications
You must be signed in to change notification settings - Fork 892
/
Copy pathStatusOptions.cs
109 lines (95 loc) · 3.46 KB
/
StatusOptions.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
namespace LibGit2Sharp
{
/// <summary>
/// Flags controlling what files are reported by status.
/// </summary>
public enum StatusShowOption
{
/// <summary>
/// Both the index and working directory are examined for changes
/// </summary>
IndexAndWorkDir = 0,
/// <summary>
/// Only the index is examined for changes
/// </summary>
IndexOnly = 1,
/// <summary>
/// Only the working directory is examined for changes
/// </summary>
WorkDirOnly = 2
}
/// <summary>
/// Options controlling the status behavior.
/// </summary>
public sealed class StatusOptions
{
/// <summary>
/// Initializes a new instance of the <see cref="StatusOptions"/> class.
/// By default, both the index and the working directory will be scanned
/// for status, and renames will be detected from changes staged in the
/// index only.
/// </summary>
public StatusOptions()
{
DetectRenamesInIndex = true;
IncludeIgnored = true;
IncludeUntracked = true;
RecurseUntrackedDirs = true;
}
/// <summary>
/// Which files should be scanned and returned
/// </summary>
public StatusShowOption Show { get; set; }
/// <summary>
/// Examine the staged changes for renames.
/// </summary>
public bool DetectRenamesInIndex { get; set; }
/// <summary>
/// Examine unstaged changes in the working directory for renames.
/// </summary>
public bool DetectRenamesInWorkDir { get; set; }
/// <summary>
/// Exclude submodules from being scanned for status
/// </summary>
public bool ExcludeSubmodules { get; set; }
/// <summary>
/// Recurse into ignored directories
/// </summary>
public bool RecurseIgnoredDirs { get; set; }
/// <summary>
/// Recurse into untracked directories
/// </summary>
public bool RecurseUntrackedDirs { get; set; }
/// <summary>
/// Limit the scope of paths to consider to the provided pathspecs
/// </summary>
/// <remarks>
/// If a PathSpec is given, the results from rename detection may
/// not be accurate.
/// </remarks>
public string[] PathSpec { get; set; }
/// <summary>
/// When set to <c>true</c>, the PathSpec paths will be considered
/// as explicit paths, and NOT as pathspecs containing globs.
/// </summary>
public bool DisablePathSpecMatch { get; set; }
/// <summary>
/// Include unaltered files when scanning for status
/// </summary>
/// <remarks>
/// Unaltered meaning the file is identical in the working directory, the index and HEAD.
/// </remarks>
public bool IncludeUnaltered { get; set; }
/// <summary>
/// Include ignored files when scanning for status
/// </summary>
/// <remarks>
/// ignored meaning present in .gitignore. Defaults to true for back compat but may improve perf to not include if you have thousands of ignored files.
/// </remarks>
public bool IncludeIgnored { get; set; }
/// <summary>
/// Include untracked files when scanning for status
/// </summary>
public bool IncludeUntracked { get; set; }
}
}