Update pre-upload hook to look for aliases in parent dirs.

Walk up the directory tree when looking for a .project_alias
file while verifying commit message prefixes. Otherwise,
changes within e.g. platform2/power_manager/powerd/policy
don't permit a "power: " prefix (as allowed by

TEST=manual; also wrote tests for _check_project_prefix

Change-Id: I3dab8144e2422fb4e594cc2fb0f1cb328b9fbc36
Reviewed-on: https://chromium-review.googlesource.com/220282
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
2 files changed