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

Implement root for Cache #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DarioDaF
Copy link

@DarioDaF DarioDaF commented Mar 3, 2023

Added a way to limit the scope of the Cache object up to a certain folder.

Example and reason for the change:

I have a git repository inside a temporary folder that is ignored.

A
- .gitignore (`/tmp/`)
- tmp
-- myrepo
--- .gitignore (`*.pyc`)
--- validFile.py
--- invalidFile.pyc

If I want to filter myrepo files everything is getting ignored by the A folder policy, with this change one can create a Cache(ignore_root='A/tmp/myrepo') object so that everything above that root is not processed by that Cache.

For how the library is written there is no way to handle this from outside the library itself, thus I am making this PR.

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.

1 participant