Following comments to this answer and information if Gerrit's docs. If adding proper refs is mandatory:
git push gerrit HEAD:refs/for/master
Then why Gerrit is accepting at all a push without them? After doing git push origin master
with proper refs missing, push is accpeted (at Git level), but no change is created (at Gerrit level). User is ending up with a mess in code review system (can't merge non-existing change, can't push nothing else, because he or she is getting no changes reject) and must do a lot of strange things to fix this problem.
What is the reason or logic for implementing a feature, that such commit will be accepted? Why Gerrit isn't rejecting pushes, that it can't handle at all?