libgit2/tests/status
Patrick Steinhardt fcb2c1c895 ignore: allow unignoring basenames in subdirectories
The .gitignore file allows for patterns which unignore previous
ignore patterns. When unignoring a previous pattern, there are
basically three cases how this is matched when no globbing is
used:

1. when a previous file has been ignored, it can be unignored by
   using its exact name, e.g.

   foo/bar
   !foo/bar

2. when a file in a subdirectory has been ignored, it can be
   unignored by using its basename, e.g.

   foo/bar
   !bar

3. when all files with a basename are ignored, a specific file
   can be unignored again by specifying its path in a
   subdirectory, e.g.

   bar
   !foo/bar

The first problem in libgit2 is that we did not correctly treat
the second case. While we verified that the negative pattern
matches the tail of the positive one, we did not verify if it
only matches the basename of the positive pattern. So e.g. we
would have also negated a pattern like

    foo/fruz_bar
    !bar

Furthermore, we did not check for the third case, where a
basename is being unignored in a certain subdirectory again.

Both issues are fixed with this commit.
2016-08-12 14:47:54 +02:00
..
ignore.c ignore: allow unignoring basenames in subdirectories 2016-08-12 14:47:54 +02:00
renames.c status test: always test the new file path 2015-05-04 07:18:29 -05:00
single.c Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
status_data.h Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
status_helpers.c Use 'X' for unreadable status. 2014-05-30 16:22:13 -07:00
status_helpers.h New tests of status for repo inside repo 2014-04-01 21:32:06 -07:00
submodules.c status: test submodules with mixed case 2016-03-31 17:58:43 -04:00
worktree_init.c status test: brackets are now literal 2015-08-30 18:57:06 -04:00
worktree.c tests: skip the unreadable file tests as root 2016-04-11 15:32:38 -04:00