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>