summaryrefslogtreecommitdiff
path: root/git/pre-commit.d/20warn-special-file
diff options
context:
space:
mode:
Diffstat (limited to 'git/pre-commit.d/20warn-special-file')
-rw-r--r--git/pre-commit.d/20warn-special-file9
1 files changed, 9 insertions, 0 deletions
diff --git a/git/pre-commit.d/20warn-special-file b/git/pre-commit.d/20warn-special-file
new file mode 100644
index 0000000..cb4d019
--- /dev/null
+++ b/git/pre-commit.d/20warn-special-file
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+special=$(find -not -type d -not -type f -not -type l | grep -v /.git/) || true
+if [ -n "$special" ]; then
+ echo "etckeeper warning: special files could cause problems with git:" >&2
+ echo "$special" >&2
+fi
+
+true