diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-14 22:23:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-15 09:02:17 +0100 |
commit | 653b513181824f1aae76e6cad0a6a00b4456f6e1 (patch) | |
tree | a61eec989560e906914715d09a88134925c06b37 /.git-hooks | |
parent | 98de1ed2e2c49ea52f398f666aef7480b60e4e3c (diff) |
clang-format: restore lost warning on touching formatted file without check
Consistently only assign something to $clang_format if it's a good
version, and also consistently return undef if we found no good version.
Change-Id: Iadbbb56a5c15dfaeec5c80e3cc8fcc78b787c04b
Reviewed-on: https://gerrit.libreoffice.org/46489
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to '.git-hooks')
-rwxr-xr-x | .git-hooks/pre-commit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index e25532bb0662..e859919fa566 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -133,7 +133,7 @@ sub check_style($) chomp $filename; if ($filename =~ /\.($src)$/ and !exists($blacklist_names->{$filename})) { - if (! -x $clang_format) + if (!defined($clang_format)) { my $version = ClangFormat::get_wanted_version(); my $opt_lo = ClangFormat::get_own_directory(); |