Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 2 sections/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ Note that you need to be using at least git 2.24 for this hook.

`pre-push` is triggered on `git push`.

note: `pre-push` hooks are not triggered for ref deletions.

Comment on lines +185 to +186

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a bit more nuance to this than just that -- the variables below imply this is already the case since there must be a from-ref and a to-ref

@whophil whophil Nov 3, 2023

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the environment variables, I was expecting PRE_COMMIT_TO_REF to be 0000000000000000000000000000000000000000 here, in the case of a ref deletion.

Would you propose an alternate wording, or not documenting this at all?

environment variables:
- `PRE_COMMIT_FROM_REF`: the revision that is being pushed to.
- `PRE_COMMIT_TO_REF`: the local revision that is being pushed to the remote.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.