summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-10 11:42:16 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-15 08:22:41 +0000
commitee34618d9f94e0cb6f678140e6cd2916308531b5 (patch)
tree5a004b83bb8da7e957747403c94a5c749cd5f7fa /git-hooks
parent0cbc25d0235de896a22dc1b08a6368fc3d9a643a (diff)
downloadqtrepotools-ee34618d9f94e0cb6f678140e6cd2916308531b5.tar.gz
Sanity-bot: Fix warning about undefined symbol $branch
Check on $target instead, fixing: Global symbol "$branch" requires explicit package name (did you forget to declare "my $branch"?) at qtrepotools/git-hooks/sanitize-commit line 508. Remove excessive braces from warning message. Amends a2ebc6aedfc217e2af4b02ae97c7a598e85daff9. Task-number: QTQAINFRA-3886 Change-Id: I10224936115fb80a82b858b2784557a6f2db7cbe Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/sanitize-commit4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index a9cdc13..ede0f3a 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -505,8 +505,8 @@ 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}'",
+ } elsif (defined($target) && ($pick eq $target)) {
+ complain_ln("Pick-to entry '$pick' equals source branch",
"pickto", 1)
}
}