pre-upload: allow more tags in cherry picked patches

The pre-upload check generates false positives on cherry picked patches
created by 'git cherry-pick -x', as these patches have more tags than
the "Signed-off-by:" in the lat paragraph.

Those cherry picked patches can be identified by the presence of the
string '(cherry-picked from commit' in the last line.

With this change more tags are accepted in the last paragraph of the
cherry picked patches.

BUG=none
TEST=verified that proper error message is generated for different
      inputs, and that valid tags do not trigger pre-submit errors any
      more.

Change-Id: I73b02e582b72b61b8245219d92cbb26cd296d76d
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/513472
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
(cherry picked from commit 20532baaae557c9c75121bca7bbe93225600c46e)
Reviewed-on: https://chromium-review.googlesource.com/517306
1 file changed