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.

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

Change-Id: I73b02e582b72b61b8245219d92cbb26cd296d76d
Signed-off-by: Vadim Bendebury <>
Reviewed-by: Guenter Roeck <>
Reviewed-by: Dmitry Torokhov <>
1 file changed