File can pass the filter if there is a file with the same basename in the current working directory.
E.g. in case of the following directory structure:
file1 (modified)
subfolder/file1 (not modified)
the second file will pass the filter gitmodified(['modified']).