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:
authorCarlos Martín Nieto <cmn@dwim.me>2015-09-13 07:18:49 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-09-13 07:18:49 +0300
commit657afd359e0e49627addb092c05ddd00117614de (patch)
treedc4b976ba54fb5f70f7f7bdd6218bd498cbeda51 /tests/status
parent6d0defe31c67a61f2f38894a2e4db7818a952d60 (diff)
ignore: add test and adjust style and comment for dir with wildmatch
The previous commit left the comment referencing the earlier state of the code, change it to explain the current logic. While here, change the logic to avoid repeating the copy of the base pattern.
Diffstat (limited to 'tests/status')
-rw-r--r--tests/status/ignore.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/status/ignore.c b/tests/status/ignore.c
index ba1d69a99..bbf8f4911 100644
--- a/tests/status/ignore.c
+++ b/tests/status/ignore.c
@@ -1022,3 +1022,20 @@ void test_status_ignore__negate_exact_previous(void)
cl_git_pass(git_ignore_path_is_ignored(&ignored, g_repo, ".buildpath"));
cl_assert_equal_i(1, ignored);
}
+
+void test_status_ignore__negate_starstar(void)
+{
+ int ignored;
+
+ g_repo = cl_git_sandbox_init("empty_standard_repo");
+
+ cl_git_mkfile("empty_standard_repo/.gitignore",
+ "code/projects/**/packages/*\n"
+ "!code/projects/**/packages/repositories.config");
+
+ cl_git_pass(git_futils_mkdir_r("code/projects/foo/bar/packages", "empty_standard_repo", 0777));
+ cl_git_mkfile("empty_standard_repo/code/projects/foo/bar/packages/repositories.config", "");
+
+ cl_git_pass(git_ignore_path_is_ignored(&ignored, g_repo, "code/projects/foo/bar/packages/repositories.config"));
+ cl_assert_equal_i(0, ignored);
+}