-
Notifications
You must be signed in to change notification settings - Fork 122
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-receive fails due to empty oldrev #49
Comments
Ya, this has been a long time bug. It only happens (as far as I know) on new branch pushes. I've gotten around it in the past by just disabling the server-side hook when pushing new branches, though I understand that is a horrible work around. If someone can come up with a way to solve this, I'd love a PR! |
Is there a part of the hook that can be disabled for the case of a new branch push? |
Actually, looks like I may be off base here. d0a01ba addressed the issues I was referring to. I'll need to dig deeper into this to see what is going on... |
Thanks drwahl |
#71 should fix the issue |
oldrev is empty at line 54 which causes git diff on line 57 of pre-receive to fail.
If I checkout master to a new branch, and push the new branch to origin/newbranchname, oldrev == 0{40} in pre-receive, newrev gets set to master, but oldrev gets set to empty and so the git diff on line 57 fails, due to the grep -v master
Reproducer with excerpt from pre-receive with set -x:
You can see oldrev is empty because of line 54:
The text was updated successfully, but these errors were encountered: