Files in directories with whitelist-style .gitignore are hidden
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 12.9k
- Forks
- 315
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 6
Description
Consider the .gitignore:
# Ignore everything, but not directories:
*
!**/
# Except the following file types:
!.gitignore
!**.txt
!**.md
Broot doesn't show any file in the directory with such .gitignore:
ls -a
. .. credits.txt .git .gitignore Readme.md
BROOT_LOG=debug br
/home/allkromm/src/bugs/broot-gitignore
mv .gitignore ..
BROOT_LOG=debug br
/home/allkromm/src/bugs/broot-gitignore
├──broot.log
├──credits.txt
└──Readme.md
Steps to reproduce the behavior:
- Open a directory with git repository and gitignore like described above (minimal example attached);
- Launch Broot;
- Type
pt;
Expected behavior: credits.txt and Readme.md files are displayed. Actual behavior: they are not displayed.
Files are displayed if .gitignore file is removed from the directory, or if gi flag is no.
- broot version: broot 1.6.3
- OS: Debian
- Version: 11.0
There is a mention of whitelist-style .gitignore files here: https://github.com/Canop/broot/issues/35#issuecomment-753346679
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached broot-gitignore.zip and reproduce the case using the shown whitelist-style .gitignore, BROOT_LOG=debug br, and the pt command. Compare filtering with and without the gi flag; done means credits.txt and Readme.md are displayed while the gitignore behavior remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100