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

--ignore not considering dir name (and probably broken in other ways) #8

Open
dvarrazzo opened this issue Jul 5, 2021 · 1 comment

Comments

@dvarrazzo
Copy link

it seems that --ignore doesn't take in consideration the full path of the file, so it's impossible to exclude a sub-directory. So it's not really a "glob/.gitignore match" as documented, as they work on the whole path.

$ dirhash -l ./ --ignore .venv | grep '\.venv' | head -1
.venv/bin/activate

It also seems that it breaks other ignores: .pyc can be excluded:

$ dirhash -l ./ --ignore \*.pyc| grep '\.pyc$' | head -1

but using two excludes pattern they come back.

$ dirhash -l ./ --ignore \*.pyc --ignore .venv | grep '\.pyc$' | head -1
.venv/lib/python3.7/__pycache__/__future__.cpython-37.pyc

dirhash version is 0.2.1

@flichtenheld
Copy link

Both issues seem to be more usability problems:

.venv doesn't work, but .venv/ does.

The syntax to give more than one pattern is --ignore <pattern1> <pattern2> not --ignore <pattern1> --ignore <pattern2>.

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

No branches or pull requests

2 participants