Installation of the mirror hooks
On the Gerrit server
- Transfer the
/opt/perforce/git-connector/bin/gconn-change-merged.pyfile from the Git Connector into thehookssubdirectory of your Gerrit installation. - Rename the file in the
hooksdirectory tochanged-merged:mv gconn-change-merged.py changed-mergedThe hook
changed-mergedenables the default Gerrit behavior of a mandatory code review of a repo before merging it into a protected branch.TipIf your organization allows direct ref commits without a mandatory code review, make a second copy in the
hookssubdirectory, this time withref-updateas the name:cp changed-merged ref-updateThe name
ref-updateenables direct ref commits. -
Make
changed-merged(and, optionally,ref-update) executable by the OS user running Gerrit.






