diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2016-11-21 19:02:26 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-11-21 18:06:49 +0000 |
commit | d4c099ddd7a6709e89508049485157380ab2dc1c (patch) | |
tree | fa8c690c2b0975006f6707e50190ac2f7b0ab032 /git-hooks | |
parent | ba46ead395c992e66c23d1b083edfe4db5086818 (diff) |
Fix glitch in detection of misguided executable permissions
Sanity-bot regards *.pl as C-like code; unlike the other kinds of file
it regards as C-like, perl scripts are sensible things to make
executable. So make an exception for them.
Change-Id: Ibbfea2149a3b735baac4424af51b55bcb5bca090
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index f5f734b..9a11fb1 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -729,7 +729,7 @@ while (<DIFF>) { # set*id; git discards it - but asking for it is misguided. complain("Adding file with set*id permissions", "permissions", 1); } elsif ($perm & 0111) { - if ($clike || $qmake || $file =~ /\.(ps|pdf|png|qdoc(cconf)?|json)$/) { + if ($qmake || ($clike && $file !~ /\.pl$/) || $file =~ /\.(ps|pdf|png|qdoc(cconf)?|json)$/) { # Should not be executable. complain("Adding implausibly executable file", "permissions"); } elsif ($file =~ /\.(py|pm|pl|sh|bash|php)$/ |