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

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-05-30 01:03:30 +0400
committerEdward Thomson <ethomson@microsoft.com>2013-05-30 01:26:25 +0400
commit2d160ef782c812bd7d68413a00a62f46585725d0 (patch)
treec771fbfe1bc5a8a6dc47c0f14b5e94936b7bbcde /tests-clar/attr
parent17776314c8d161d78917e5fb2805d78a3c8c3599 (diff)
allow (ignore) bare slash in gitignore
Diffstat (limited to 'tests-clar/attr')
-rw-r--r--tests-clar/attr/ignore.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests-clar/attr/ignore.c b/tests-clar/attr/ignore.c
index 8df0eb9de..0f945ebf6 100644
--- a/tests-clar/attr/ignore.c
+++ b/tests-clar/attr/ignore.c
@@ -34,6 +34,27 @@ void test_attr_ignore__honor_temporary_rules(void)
assert_is_ignored(true, "NewFolder/NewFolder/File.txt");
}
+void test_attr_ignore__allow_root(void)
+{
+ cl_git_rewritefile("attr/.gitignore", "/");
+
+ assert_is_ignored(false, "File.txt");
+ assert_is_ignored(false, "NewFolder");
+ assert_is_ignored(false, "NewFolder/NewFolder");
+ assert_is_ignored(false, "NewFolder/NewFolder/File.txt");
+}
+
+void test_attr_ignore__ignore_root(void)
+{
+ cl_git_rewritefile("attr/.gitignore", "/\n\n/NewFolder\n/NewFolder/NewFolder");
+
+ assert_is_ignored(false, "File.txt");
+ assert_is_ignored(true, "NewFolder");
+ assert_is_ignored(true, "NewFolder/NewFolder");
+ assert_is_ignored(true, "NewFolder/NewFolder/File.txt");
+}
+
+
void test_attr_ignore__skip_gitignore_directory(void)
{
cl_git_rewritefile("attr/.git/info/exclude", "/NewFolder\n/NewFolder/NewFolder");