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

Pre-push local and remote ref (branch name) are unavailable. #1410

Closed
MaicoTimmerman opened this issue Apr 23, 2020 · 3 comments
Closed

Pre-push local and remote ref (branch name) are unavailable. #1410

MaicoTimmerman opened this issue Apr 23, 2020 · 3 comments

Comments

@MaicoTimmerman
Copy link

@MaicoTimmerman MaicoTimmerman commented Apr 23, 2020

The grammar for a pre-push hook is:

<local ref> SP <local sha1> SP <remote ref> SP <remote sha1> LF

I'd like to use the <local ref> and <remote ref> to add extra conditions for pushing to those branches, like which credentials are active. Current only the sha's are exposed as PRE_COMMIT_FROM_REF and PRE_COMMIT_TO_REF.

Can the refs be exposed as well?

@asottile
Copy link
Member

@asottile asottile commented Apr 23, 2020

if you'd like to work on this, here's the code hints:

@microcat49
Copy link

@microcat49 microcat49 commented Apr 12, 2021

Hey @asottile,

Could I work on this one? I know how to solve it.

@asottile
Copy link
Member

@asottile asottile commented Apr 12, 2021

sure! go for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants