summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-01-05 13:49:06 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-01-08 13:53:08 +0000
commit2a269f42b2a3cb0ff71d101d044540e6c515669b (patch)
tree039fe3af01a8caa1a0797c229093dcf403b2ec24
parent69c9df2b993380f33306857b2fbbfbfe6e7549af (diff)
Match "new mode" as well as "new file mode" in permissions check
The permissions check was only looking at "new file mode", which is only present for new files. For existing files, when they change mode, the line says "new mode" instead. So match that, too. This catches what qtbase/ffc8409aa58c04c1dd140001976b55925ac959f6 did wrong. Change-Id: I07b30c1b88c067c3f90888ff3b212b15a9384134 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rwxr-xr-xgit-hooks/sanitize-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index ca6879e..825ccba 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -812,7 +812,7 @@ while (<DIFF>) {
}
next;
}
- if (/^new file mode (\d+)$/) {
+ if (/^new(?: file)? mode (\d+)$/) {
my $text = $1;
if ($text eq "160000" || $text eq "120000") {
$is_special = 1;