-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fails on bash 4 during pre-commit hook #45
Comments
I'm seeing this same issue on OSX with git-secrets 1.2.1 (from homebrew) under zsh 5.0.8 (also from homebrew). I have bash 4.4.12 installed as well. |
ping @mtdowling: doesn't look like Travis has been running the tests, or at least not on bash 4 - I get 3 failures when running the tests locally using bash 4, and the output is just like what is described here. |
I've been looking into this and seeing if I can get a Travis build matrix setup to test against bash 4. I made some progress, but there's still work to be done to get the full matrix actually working an passing.
I'll keep working at this. Let me know if you or anyone else has feedback on the approach or fixes that can be made. |
This PR fixes the issue described here. awslabs#45 (comment)
This PR should fix the pre-commit hook error |
Just hit this as well. Is #54 going to be merged? |
Ok thanks |
Can the maintainers merge this PR please? |
Fixed via #54 |
#54 Does not fix this issue Committing a single file (with aws secret) will result in the warning. |
Hello,
we noticed a problem on bash 4 when multiple files have been changed by a commit.
When getting called in a pre-commit hook we get this error:
fatal: ambiguous argument 'slides/Container_Network_Model/Body.md slides/Container_Network_Model/Cover.md': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'
On bash 3 it works.
It seems like in bash 4 the files argument is passed to the git_grep function with quotes
git grep -nwHEI --cached '...mypattern...' 'slides/Container_Network_Model/Body.md slides/Container_Network_Model/Cover.md'
in bash 3 the quotes are not there
git grep -nwHEI --cached '...mypattern...' slides/Container_Network_Model/Body.md slides/Container_Network_Model/Cover.md
The text was updated successfully, but these errors were encountered: