I feel a misunderstanding here: if you are trying to add a code review as a preliminary verification step, you consider the source repository as authority for the perfect, perfect code, but do not allow its imperfect code. This is detrimental to the overall usefulness of the original repository. The code should be in storage as early as possible. Code in the repository is tracked with changes, easily accessible, easier to view, and simplifies backups.
So, follow the easy route: save the code in the branches (maybe an additional unreviewed folder next to branches and tags ) and look at the branch before it is merged into its target branch. The technical side becomes simpler, and you do not need to intercept hooks.
source share