diff options
author | Daniel Smith <daniel.smith@qt.io> | 2020-09-04 10:51:28 +0200 |
---|---|---|
committer | Daniel Smith <Daniel.Smith@qt.io> | 2020-09-08 08:26:56 +0000 |
commit | a2ebc6aedfc217e2af4b02ae97c7a598e85daff9 (patch) | |
tree | d9cccba3cee74f18d12d877ee6bc03cf78f724f0 | |
parent | 9207982f370e0bf393df2478a9b8e5e0f30882bd (diff) |
Sanity-bot: Make sure Pick-to footer doesn't contain source branch
The sanity bot should warn if the source branch is in the Pick-to
footer since this would be redundant and cause a failed pick attempt
by the cherry-pick bot. Only exact branches are matched, since
it is possible to submit a change to a minor branch with a Pick-to
footer that targets a bugfix branch.
Fixes: QTQAINFRA-3886
Change-Id: I234d20205bd3896b7be631ba29db2efe895b9bd3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
-rwxr-xr-x | git-hooks/sanitize-commit | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index b38359d..a9cdc13 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -505,6 +505,9 @@ while (<MSG>) { if (!defined($allHeads{$pick})) { complain_ln("Pick-to entry '$pick' is not a valid branch in $repo", "pickto", 1); + } elsif ($pick eq $branch) { + complain_ln("Pick-to entry ${pick} equals source branch '${$branch}'", + "pickto", 1) } } complain_ln("Capitalization of \"Pick-to\" is wrong", "") if (!/^Pick-to:/); |