Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-09-20 18:01:24 +0400
committerEmeric Fermas <emeric.fermas@gmail.com>2011-09-29 02:01:59 +0400
commit02dbc31a91fa7dccebf7cda33f24dc768fefbb17 (patch)
tree9e5bbbf70fef8763e2fa4cc363a3fd16a30d6706 /LibGit2Sharp/FileStatus.cs
parentf25065331a0fafe4ccaefdff109536252169e385 (diff)
Add determination of repository status
- Doesn't handle line endings conversion - Doesn't honor .gitignore - Test repositories have been moved under LibGit2Sharp.Tests - .gitattributes file has been added to prevent unexpected line endings conversion of the test repositories files Should fix issue #49.
Diffstat (limited to 'LibGit2Sharp/FileStatus.cs')
-rw-r--r--LibGit2Sharp/FileStatus.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/LibGit2Sharp/FileStatus.cs b/LibGit2Sharp/FileStatus.cs
new file mode 100644
index 00000000..b8dd951f
--- /dev/null
+++ b/LibGit2Sharp/FileStatus.cs
@@ -0,0 +1,44 @@
+using System;
+
+namespace LibGit2Sharp
+{
+ [Flags]
+ public enum FileStatus
+ {
+ Nonexistent = -1, /* GIT_STATUS_NOTFOUND */
+ Unaltered = 0, /* GIT_STATUS_CURRENT */
+
+ /// <summary>
+ /// New file has been added to the Index. It's unknown from the Head.
+ /// </summary>
+ Added = (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>
+ Staged = (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>
+ Removed = (1 << 2), /* GIT_STATUS_INDEX_DELETED */
+
+ /// <summary>
+ /// New file in the working directory, unknown from the Index and the Head.
+ /// </summary>
+ Untracked = (1 << 3), /* GIT_STATUS_WT_NEW */
+
+ /// <summary>
+ /// The file has been updated in the working directory. A previous version exists in the Index.
+ /// </summary>
+ Modified = (1 << 4), /* GIT_STATUS_WT_MODIFIED */
+
+ /// <summary>
+ /// The file has been deleted from the working directory. A previous version exists in the Index.
+ /// </summary>
+ Missing = (1 << 5), /* GIT_STATUS_WT_DELETED */
+
+ //TODO: Ignored files not handled yet
+ GIT_STATUS_IGNORED = (1 << 6), /* GIT_STATUS_IGNORED */
+ }
+}