Further hook tweaks for gerrit

Change-Id: I082b7c74b1d459f50576328f330be7f58b9ce2d5
Merge "Further hook tweaks for gerrit" into production