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

Revert "fix pre-push to compare with main on first push" #2607

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

shtukas
Copy link
Contributor

@shtukas shtukas commented Dec 19, 2024

Reverts #2605 , because it breaks pushing for me.

support-service-lambdas % git push origin HEAD                 
fatal: bad revision 'origin/ph-20241219-1154-upgrade'
husky - pre-push script failed (code 128)
error: failed to push some refs to 'https://github.com/guardian/support-service-lambdas.git'

@shtukas shtukas merged commit 06064f7 into main Dec 19, 2024
48 checks passed
@shtukas shtukas deleted the revert-2605-jd-fix-pre-push-condition branch December 19, 2024 14:04
@johnduffell
Copy link
Member

sorry about that, it's strange, I thought I tested all four combinations carefully! Thanks for reverting it. I also didn't realise that a nonzero exit code would kill the whole script without the -e flag.
According to git docs hooks are just "programs" and there's no #! line at the top of the file, so I wonder if the default shell could affect things

@shtukas Is your default shell set up to die on error by default? Perhaps this script needs to be more explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants