-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
Consider the case of a directory structure like :
.
|-- directoryD
| |-- fileE
| `-- fileF
|-- directoryG
| |-- directoryH
| | |-- fileI
| | |-- fileJ
| | |-- fileK
| | |-- fileL
| | |-- fileM
| | `-- fileN
| `-- fileO
|-- fileA
|-- fileB
|-- fileC
`-- .gitignore
The contents of the .gitignore
file are :
fileB
directoryD/*
directoryG/*
Now if we use pathspec
to match all the files with the specs defined in .gitignore
then here are the responses of match_file(filepath)
function:
|-- directoryD : False
| |-- fileE : True
| `-- fileF : True
|-- directoryG : False
| `-- directoryH : True
| |-- fileI : False
| |-- fileJ : False
| |-- fileK : False
| |-- fileL : False
| |-- fileM : False
| `-- fileN : False
| `-- fileO : True
|-- fileA : False
|-- fileB : True
|-- fileC : True
`-- .gitignore
If you compare it with the behaviour of .gitignore
inside a git repository, the files inside directoryH
should all return True
as a reponse to the match_file
function. Or am I getting something wrong ?
Metadata
Metadata
Assignees
Labels
No labels