pre-upload: allow repos to pass in custom options to hooks

Currently you can enable hooks in PRESUBMIT.cfg, but not tweak their
behavior.  A dedicated hook name would have to be created.  Instead,
let people pass in an open ended set of options that'll get passed to
the hook and it can do what it wants.

For example, you can enable checkpatch in a repo:
[Hook Overrides]
checkpatch_check: true

And you can pass in specific checkpatch options:
[Hook Overrides Options]
checkpatch_check: --no-tree --ignore=MSLEEP,VOLATILE

TEST=`./` passes

Change-Id: Ia9f09ecabb6f44785fcf8b78c2d0f8f1d003cea0
Reviewed-by: Vadim Bendebury <>
Reviewed-by: Steve Fung <>
Commit-Queue: Mike Frysinger <>
Tested-by: Mike Frysinger <>
1 file changed