Skip to content

Commit b34aaf6

Browse files
committed
test that specific lines can negate broader ignore lines
1 parent 8cad7e6 commit b34aaf6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/ignore/path.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,3 +575,11 @@ void test_ignore_path__negative_prefix_rule(void)
575575
assert_is_ignored(true, "ff");
576576
assert_is_ignored(false, "f");
577577
}
578+
579+
void test_ignore_path__negative_more_specific(void)
580+
{
581+
cl_git_rewritefile("attr/.gitignore", "*.txt\n!/dir/test.txt\n");
582+
assert_is_ignored(true, "test.txt");
583+
assert_is_ignored(false, "dir/test.txt");
584+
assert_is_ignored(true, "outer/dir/test.txt");
585+
}

0 commit comments

Comments
 (0)