summaryrefslogtreecommitdiff
path: root/.git-hooks
diff options
context:
space:
mode:
Diffstat (limited to '.git-hooks')
-rwxr-xr-x.git-hooks/pre-commit14
1 files changed, 14 insertions, 0 deletions
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
index e859919fa566..8c4e86345aa1 100755
--- a/.git-hooks/pre-commit
+++ b/.git-hooks/pre-commit
@@ -109,6 +109,17 @@ sub check_whitespaces($)
}
}
+sub check_author()
+{
+ my $author = `git var GIT_AUTHOR_IDENT`;
+ chomp $author;
+ if ($author =~ /^Your Name <you\@example.com>/)
+ {
+ print("ERROR: You have a suspicious author identity: '$author'\n");
+ exit(1);
+ }
+}
+
sub check_style($)
{
if (! -e "solenv/clang-format/ClangFormat.pm")
@@ -266,6 +277,9 @@ check_whitespaces( $against);
# fix style in code
check_style($against);
+# catch missing author info
+check_author();
+
# all OK
exit( 0 );
# vi:set shiftwidth=4 expandtab: