-
Notifications
You must be signed in to change notification settings - Fork 220
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
Accessing git hook arguments from files
command
#315
Comments
Closing as it is likely a duplicate of #269. |
Also when you use {0} - it prints all git arguments for the hook. Use {1} for first argument and {2} for the second. See https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md#git-hook-argument-shorthands-in-commands |
Hi @mrexox I was looking for the same thing, I want to perform post-checkout:
commands:
01-bundle-install:
files: git diff --name-only {1} {2} | grep -i Gemfile
run: bundle install But is not working because |
I've tried to use
post-checkout
hook and I tried to diff the changed files usinggit diff --name-only {1} {0}
but I noticed this doesn't work and{files}
just printedfiles
.The text was updated successfully, but these errors were encountered: