pre-upload: fix COMMIT-QUEUE.ini check

The current check never works because _get_file_content always returns
an empty string.  This is because we pass it full filesystem paths, but
_get_file_content only works with relative paths.

Fix the file filtering call to get relative paths, and add a sanity
check to the _get_file_content helper to prevent any future hooks from
going unnoticed.

BUG=chromium:655381
TEST=`repo upload` rejects an invalid COMMIT-QUEUE.ini CL now

Change-Id: If80aa5ed18e932255262ad5aba5ccb8bc0cefd8d
Reviewed-on: https://chromium-review.googlesource.com/847941
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
1 file changed