Skip to content
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

bug: --git-ignore ignores .gitignore file in child directory #1086

Open
injust opened this issue Aug 8, 2024 · 4 comments
Open

bug: --git-ignore ignores .gitignore file in child directory #1086

injust opened this issue Aug 8, 2024 · 4 comments
Labels
errors Something isn't working

Comments

@injust
Copy link
Contributor

injust commented Aug 8, 2024

When running eza --tree --git-ignore, eza will respect a .gitignore file if it's in the current directory or a parent directory. When recursing (e.g. with --tree), eza ignores .gitignore files in child directories.

For example: I have a Git repo at ~/code/repo/ with a .gitignore file at ~/code/repo/.gitignore.

If I run eza --tree --git-ignore from ~/code/repo/, it works as expected. If I run eza --tree --git-ignore from ~/code/, the .gitignore is ignored.


eza version: 0.19.0 [+git]
Shell: fish v3.7.1
Terminal: Ghostty
OS: macOS Sonoma 14.6 (Intel)

@injust injust added the errors Something isn't working label Aug 8, 2024
@cafkafk
Copy link
Member

cafkafk commented Aug 9, 2024

I can't reproduce this:

eza -T
.
├── bla
└── blo
   └── file
eza -T --git-ignore 
.
├── bla
└── blo
bat -p blo/.gitignore 
file

@cafkafk
Copy link
Member

cafkafk commented Aug 9, 2024

Ideally, if you could post an example repo that would likely make it much quicker to reproduce

@injust
Copy link
Contributor Author

injust commented Aug 9, 2024

image

@injust
Copy link
Contributor Author

injust commented Aug 9, 2024

Ah, I think I explained it badly. The gitignore file is still at the root of the repo, but the repo is a child directory of where I am running the eza command.

I can't reproduce this:

eza -T
.
├── bla
└── blo
   └── file
eza -T --git-ignore 
.
├── bla
└── blo
bat -p blo/.gitignore 
file

I think it would have repro'd if you cd .. and ran the same eza command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants