pre-upload: Filter out enabled hooks from common hook list
Otherwise some hooks (such as cros_license_check) would run twice when
enabled with custom options, the second run without the requested
Also refactor some of the code to make it cleaner.
TEST=Ran a presubmit with cros_license_check options successfully.
Signed-off-by: Filipe Brandenburger <firstname.lastname@example.org>
Reviewed-by: Mike Frysinger <email@example.com>
1 file changed