Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add some more test coverage demonstrating the handling of .gitgnore file

  • Loading branch information...
commit 0b4e5412fc6b0062a927a7a4683e9ca230ae3b9d 1 parent d9e3dbc
@nulltoken nulltoken authored
View
2  LibGit2Sharp.Tests/StatusFixture.cs
@@ -146,6 +146,8 @@ public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectives()
RepositoryStatus newStatus = repo.Index.RetrieveStatus();
newStatus.Untracked.Single().ShouldEqual(".gitignore");
+
+ repo.Index.RetrieveStatus(relativePath).ShouldEqual(FileStatus.Ignored);
}
}
}
View
6 LibGit2Sharp/FileStatus.cs
@@ -45,7 +45,9 @@ public enum FileStatus
/// </summary>
Missing = (1 << 5), /* GIT_STATUS_WT_DELETED */
- //TODO: Ignored files not handled yet
- GIT_STATUS_IGNORED = (1 << 6), /* GIT_STATUS_IGNORED */
+ /// <summary>
+ /// The file is <see cref="Untracked"/> but its name and/or path macthes an exclude pattern in a <c>gitignore</c> file.
+ /// </summary>
+ Ignored = (1 << 6), /* GIT_STATUS_IGNORED */
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.