-
-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exa treats gitignore /
s literally
#369
Comments
I came here to post this. For bizarre reasons |
I use a leading "/" quite often to block objects that only appear at the root of a repo, like "/target" for Rust/Cargo projects. I was pretty confused to see exa listing them when --git-ignore is specified. |
Doesn't seem that bizarre; this seems like a reasonable convention to indicate you want to ignore "project_root/target" but not "project_root/src/target" |
Since there appears to be some confusion, let's clarify: As per said documentation:
In terms of being relative to the filesystem, git does not consider the filesystem paths because git has no control over where the checkout happens. If someone has a checkout in Gitignore only makes sense in the scope of git (rather than the larger filesystem) and thus must not consider anything outside of the repository (including in alternative implemetations, such as here). (requirement keywords as per rfc2119) |
This has been fixed by #653. |
Example test:
Take the following repository structure:
with the contents of
.gitignore
being:exa --tree --git-ignore
will show all of the files.In comparison, fd and rg --files will show no output.
The text was updated successfully, but these errors were encountered: