dulwich icon indicating copy to clipboard operation
dulwich copied to clipboard

ignore: Doesn't match git check-ignore when pattern contains slash at beggining and end.

Open daavoo opened this issue 3 years ago • 1 comments

$ cat .gitignore 
/data/
$ git check-ignore data -v
.gitignore:1:/data/	data
$ python
>>> from dulwich import ignore
>>> a = ignore.IgnoreFilter((ignore.read_ignore_patterns(open(".gitignore", "rb"))))
>>> a.is_ignored("data")
>>> a.is_ignored("data/")
True

Originally posted by @daavoo in https://github.com/iterative/dvc/issues/7815#issuecomment-1139442721

daavoo avatar May 27 '22 09:05 daavoo

Help with this would be great. The first step is probably to add an entry to dulwich/tests/test_ignore.py reproducing this test case.

jelmer avatar Jun 05 '22 12:06 jelmer