diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 63e597b4ae1d2001b243f82560c26ddcf11f6654..5ca6161fcb1b3807282c1017e9651e9c43a13a70 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -470,6 +470,7 @@ my $ws_check; my $tsv_check; my $eof_check; my $ctlkw_check; +my $apple_check; open DIFF, "git diff-tree --patience --no-commit-id --diff-filter=ACMR --src-prefix=\@old\@/ --dst-prefix=\@new\@/ --full-index -r -U100000 --cc -C -l1000 --root ".$sha1." |" or die "cannot run git: $!"; while (<DIFF>) { if (/^-/) { @@ -550,7 +551,7 @@ while (<DIFF>) { } } check_spelling() if ($spell_check); - check_apple_terminology(); + check_apple_terminology() if ($apple_check); } else { flushChunk() if ($chunk); if (/^ /) { @@ -601,6 +602,7 @@ while (<DIFF>) { $eof_check = ($file !~ /\.plist(\.[^.\/]+)?$/); # Xcode consistently forgets the trailing newline # .ts files usually contain languages other than English $spell_check = !defined($cfg{spell}) && !$foreign && ($file !~ /\.ts$/i); + $apple_check = !$foreign && ($file !~ /\.ts$/i); $conflict_fail = defined($cfg{conflict}); $braces = 0; $check_gen = 0;