Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up--ignore-file and subdirs #374
Comments
|
Thank you for reporting this. If you add files via This behavior is inherited from the I'm not sure, if there is an easy way to change this, though. |
|
Interesting! The current working directory thing makes it so So the temporary workaround for scripting use would be to |
|
This might be related to BurntSushi/ripgrep#278 and BurntSushi/ripgrep#829. Which are both bugs caused by the same behaviour in the ignore library, where it uses the current working directory places it shouldn't. |
Forward slash is special in
.gitignoreformat, in that a trailing slash is stripped but means to only match directories, and the behavior of shell globs*?and[]is changed if/is present.Now to the point: In fd,
--ignore-filepatterns don't match subdirs. To ignore adir1/file1.txt,doesn't work. To make it work, replace
/with*:The first pattern does work for fd when placed into a
.gitignore.More fail cases:
Is supposed to match files recursively, does nothing, works in
.gitignore.Is supposed to match from the beginning of the pattern (so, sort of not what one would expect?), does nothing, works in
.gitignore.As a sub-case of the above,
/*does not work (probably because/changes the behavior);/**and*do.