Use the upstream tracking branch of current branch as base, instead of m/master.

Check for the tracking branch of the current branch to use for finding new commits.
Errors out if repo is not on a branch or is not on a tracking branch.

BUG=14931
TEST=Uploaded this change

Change-Id: If6e94dc149a37d7242d5a85f37e9a4b2bd7cfa32
Reviewed-on: http://gerrit.chromium.org/gerrit/383
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
1 file changed
tree: 4e4c35c6bc4c0ae0a5f3e5101f8eee85320a7700
  1. checkpatch.pl
  2. pre-upload.py