summaryrefslogtreecommitdiffstats
path: root/git-hooks
diff options
context:
space:
mode:
authorDaniel Smith <daniel.smith@qt.io>2025-08-22 09:05:44 +0200
committerDaniel Smith <daniel.smith@qt.io>2025-09-09 08:18:34 +0000
commite09e2ff8248272d070408556ddac05365d648649 (patch)
tree2e2206deb5ac90d7e892415a1f0ff123577c85ab /git-hooks
parent7a3a23f3ccd74c0a1041ee244f48b4e6b0c72ba6 (diff)
Detect duplicate Pick-to footer entriesHEADmaster
Fixes: QTQAINFRA-7354 Change-Id: I9779fa151e3ccbc9684ebe9d6c10faaa7b437b44 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Daniel Smith <daniel.smith@qt.io>
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/sanitize-commit4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 9ff78c5..7e8d8bd 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -520,6 +520,10 @@ while (<MSG>) {
complain_ln("Multiple tasks in one footer", "") if ($1 =~ /[ ,]/);
} elsif (/^Pick-to: *(.*)/i) {
for my $pick (split(/\s+/, $1)) {
+ if (exists($picktos{$pick})) {
+ complain_ln("Duplicate entry '$pick' in Pick-to footer", "pickto", 1);
+ next;
+ }
$picktos{$pick} = 1;
my $valid_pick = 0;
if ($repo !~ /\/tqtc-/ && $pick =~ /^(\d+\.\d+)\.\d+$/