Consider the use case when you have a directory structure like this :
.
|-- 0.csv
|-- A
| `-- 1.csv
`-- .gitignore
and the contents of .gitignore are :
ignorespec.match_file("A/0.csv") returns True, which is expected.
while
ignorespec.match_file("./A/0.csv") returns False.