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

Non erased global ignore #932

Merged
merged 9 commits into from
Aug 15, 2024
Merged

Non erased global ignore #932

merged 9 commits into from
Aug 15, 2024

Conversation

Canop
Copy link
Owner

@Canop Canop commented Aug 14, 2024

The list of ignore files applicable to a directory contains

  • the global .gitignore file (if any)
  • all the .ignore files found in the current directory and in parents
  • the .git/info/exclude file of the current git repository
  • all the .gitignore files found in the current directory and in parents but not outside the current git repository (i.e. not in git repositories containing the current git repository)

Deeper file have a bigger priority.
.ignore files have a bigger priority than .gitignore files.


Those rules allow for example having personal my-notes.* files always ignored by git but visible in broot, with only global files:

In ~/.config/git/ignore :

.ignore
my-notes.*

In ~/.ignore :

!my-notes.*

(note the ! before the pattern)

Canop added 5 commits August 13, 2024 15:39

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@Canop Canop merged commit 29ea016 into main Aug 15, 2024
1 check passed
@Canop Canop deleted the non-erased-global-ignore branch August 15, 2024 09:15
@FrancescElies
Copy link
Contributor

works nicely, thanks!

grafik

Over the next week I will be testing this in a windows setup too.

@Canop
Copy link
Owner Author

Canop commented Aug 16, 2024

Over the next week I will be testing this in a windows setup too.

Thanks. So I'll wait for a few days before releasing a new version of broot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants