This repository was archived by the owner on Feb 3, 2023. It is now read-only.
forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathFileStatus.cs
More file actions
134 lines (111 loc) · 5.81 KB
/
FileStatus.cs
File metadata and controls
134 lines (111 loc) · 5.81 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
using System;
namespace LibGit2Sharp
{
/// <summary>
/// Calculated status of a filepath in the working directory considering the current <see cref="Repository.Index"/> and the <see cref="Repository.Head"/>.
/// </summary>
[Flags]
public enum FileStatus
{
/// <summary>
/// The file doesn't exist.
/// </summary>
Nonexistent = (1 << 31),
/// <summary>
/// The file hasn't been modified.
/// </summary>
Unaltered = 0, /* GIT_STATUS_CURRENT */
/// <summary>
/// New file has been added to the Index. It's unknown from the Head.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use NewInIndex instead.")]
Added = (1 << 0), /* GIT_STATUS_INDEX_NEW */
/// <summary>
/// New file has been added to the Index. It's unknown from the Head.
/// </summary>
NewInIndex = (1 << 0), /* GIT_STATUS_INDEX_NEW */
/// <summary>
/// New version of a file has been added to the Index. A previous version exists in the Head.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use ModifiedInIndex instead.")]
Staged = (1 << 1), /* GIT_STATUS_INDEX_MODIFIED */
/// <summary>
/// New version of a file has been added to the Index. A previous version exists in the Head.
/// </summary>
ModifiedInIndex = (1 << 1), /* GIT_STATUS_INDEX_MODIFIED */
/// <summary>
/// The deletion of a file has been promoted from the working directory to the Index. A previous version exists in the Head.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use DeletedFromIndex instead.")]
Removed = (1 << 2), /* GIT_STATUS_INDEX_DELETED */
/// <summary>
/// The deletion of a file has been promoted from the working directory to the Index. A previous version exists in the Head.
/// </summary>
DeletedFromIndex = (1 << 2), /* GIT_STATUS_INDEX_DELETED */
/// <summary>
/// The renaming of a file has been promoted from the working directory to the Index. A previous version exists in the Head.
/// </summary>
RenamedInIndex = (1 << 3), /* GIT_STATUS_INDEX_RENAMED */
/// <summary>
/// A change in type for a file has been promoted from the working directory to the Index. A previous version exists in the Head.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use TypeChangeInIndex instead.")]
StagedTypeChange = (1 << 4), /* GIT_STATUS_INDEX_TYPECHANGE */
/// <summary>
/// A change in type for a file has been promoted from the working directory to the Index. A previous version exists in the Head.
/// </summary>
TypeChangeInIndex = (1 << 4), /* GIT_STATUS_INDEX_TYPECHANGE */
/// <summary>
/// New file in the working directory, unknown from the Index and the Head.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use NewInWorkdir instead.")]
Untracked = (1 << 7), /* GIT_STATUS_WT_NEW */
/// <summary>
/// New file in the working directory, unknown from the Index and the Head.
/// </summary>
NewInWorkdir = (1 << 7), /* GIT_STATUS_WT_NEW */
/// <summary>
/// The file has been updated in the working directory. A previous version exists in the Index.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use ModifiedInWorkdir instead.")]
Modified = (1 << 8), /* GIT_STATUS_WT_MODIFIED */
/// <summary>
/// The file has been updated in the working directory. A previous version exists in the Index.
/// </summary>
ModifiedInWorkdir = (1 << 8), /* GIT_STATUS_WT_MODIFIED */
/// <summary>
/// The file has been deleted from the working directory. A previous version exists in the Index.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use DeletedFromWorkdir instead.")]
Missing = (1 << 9), /* GIT_STATUS_WT_DELETED */
/// <summary>
/// The file has been deleted from the working directory. A previous version exists in the Index.
/// </summary>
DeletedFromWorkdir = (1 << 9), /* GIT_STATUS_WT_DELETED */
/// <summary>
/// The file type has been changed in the working directory. A previous version exists in the Index.
/// </summary>
[Obsolete("This enum member will be removed in the next release. Please use TypeChangeInWorkdir instead.")]
TypeChanged = (1 << 10), /* GIT_STATUS_WT_TYPECHANGE */
/// <summary>
/// The file type has been changed in the working directory. A previous version exists in the Index.
/// </summary>
TypeChangeInWorkdir = (1 << 10), /* GIT_STATUS_WT_TYPECHANGE */
/// <summary>
/// The file has been renamed in the working directory. The previous version at the previous name exists in the Index.
/// </summary>
RenamedInWorkdir = (1 << 11), /* GIT_STATUS_WT_RENAMED */
/// <summary>
/// The file is unreadable in the working directory.
/// </summary>
Unreadable = (1 << 12), /* GIT_STATUS_WT_UNREADABLE */
/// <summary>
/// The file is <see cref="NewInWorkdir"/> but its name and/or path matches an exclude pattern in a <c>gitignore</c> file.
/// </summary>
Ignored = (1 << 14), /* GIT_STATUS_IGNORED */
/// <summary>
/// The file is <see cref="Conflicted"/> due to a merge.
/// </summary>
Conflicted = (1 << 15), /* GIT_STATUS_CONFLICTED */
}
}