You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to write a pre-push hook which prevents tag deletion.
By way of print statements, I observe the following behavior.
When I install the pre-push hook via pre-commit:
I push a tag with git push origin tmptag, the hook is invoked.
I delete a tag with git push origin :tmptag, the hook is not invoked
In contrast, if I forgo pre-commit and manually put a pre-push file in my .git/hooks/ folder
I push a tag with git push origin tmptag, the hook is invoked.
I delete a tag with git push origin :tmptag, the hook is invoked
Am I misunderstanding how the pre-push hook of pre-commit is supposed to work? Or is there some logic within pre-commit to skip the execution of pre-push hooks under certain circumstances?
search you tried in the issue tracker
pre-push
describe your issue
I am attempting to write a
pre-pushhook which prevents tag deletion.By way of print statements, I observe the following behavior.
When I install the pre-push hook via pre-commit:
git push origin tmptag, the hook is invoked.git push origin :tmptag, the hook is not invokedIn contrast, if I forgo pre-commit and manually put a
pre-pushfile in my.git/hooks/foldergit push origin tmptag, the hook is invoked.git push origin :tmptag, the hook is invokedAm I misunderstanding how the
pre-pushhook of pre-commit is supposed to work? Or is there some logic within pre-commit to skip the execution ofpre-pushhooks under certain circumstances?pre-commit --version
3.3.3
.pre-commit-config.yaml
~/.cache/pre-commit/pre-commit.log (if present)
No response