diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-01 16:49:46 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-19 13:20:03 +0000 |
commit | bdc5b7218289ab0680f27a99a7daaecbc859815e (patch) | |
tree | d006f4680f7b720766066c5ea64523ce181c59b5 /git-hooks | |
parent | dfb5e10927531c56d69115df1a1a8ebb494065ec (diff) | |
download | qtrepotools-bdc5b7218289ab0680f27a99a7daaecbc859815e.tar.gz |
sanitize-commit: recognize cross-repo cherry-picks
we don't validate them, though, as we have no access to the source
repository.
Change-Id: I8eea89506aca007cb2413d24632904ab81119cae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 8fe08ce..d9cb95c 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -473,9 +473,11 @@ while (<MSG>) { complain_ln("Capitalization of \"Task-number\" is wrong", "") if (!/^Task-number:/); } my $ftr = 0; - if (/^\((?:partial(?:ly)? )?(?:cherry[- ]pick|(?:back-?)?port)(?:ed)?(?: from| of)?(?: commit)? ([[:xdigit:]]{7,40})/) { - check_cherry_pick($1) if (!defined($cfg{cherry})); - $havecherry = 1; + if (/^\((?:partial(?:ly)? )?(?:cherry[- ]pick|(?:back-?)?port)(?:ed)?(?: from| of)?(?: commit)? (\w+\/)?([[:xdigit:]]{7,40})/) { + if (!$1) { + check_cherry_pick($2) if (!defined($cfg{cherry})); + $havecherry = 1; + } $cherry = 1 if (!/\)/); # Some bad footers are ok above cherry-pick lines. $badrev = 0; |