| Issue 457: | Allow storing more .git/hooks in gerrit. | |
| 3 people starred this issue and may be notified of changes. | Back to list |
It would be nice to be able to store more hooks in gerrit, in addition to the commit-msg one. Some examples include checking for whitespace and coding conventions, which while different per project, are likely the same for the whole project. Obviously these could be done on the bare repo, but its nice to check these before a push.
Apr 24, 2010
#1
sop@google.com
Status:
AwaitingInformation
Apr 24, 2010
Yes, that's what I meant. I'm not sure how they should setup. It's a good question. Possibly have a per-project repo that is initialized with the default commit-msg hook. Then the administrator would have commit access to this repo. You could leave the "scp" shortcut as a way to read-only access it. Ciao!
Aug 11, 2011
Incidentally, this would also provide a way for an administrator to modify the built-in commit-msg hook that is usually available via scp. E.g., we are using the "trackingid" config directive to allow doing something like "Issue: JIRA-123" in the footer. But with that footer, Gerrit assumes that the "Issue:" line is not a footer, and therefore inserts a blank line after what is already a footer. The built-in hook has a single special case for "Signed-off-by", but doesn't have a way to allow for other footer tags to be interpreted as footers.
Dec 19, 2011
as project configuration is now increasingly moving to refs/meta, it should be no big deal to put the hook config there as well. the "UI" could be as much as an access rule permitting direct pushed to a specific ref. this issue should be moved to a different status ... |
|
| ► Sign in to add a comment |