summaryrefslogtreecommitdiff
path: root/pre-commit.d
diff options
context:
space:
mode:
Diffstat (limited to 'pre-commit.d')
-rwxr-xr-xpre-commit.d/20store-empty-directory19
-rwxr-xr-xpre-commit.d/20warn-hardlinks7
-rwxr-xr-xpre-commit.d/20warn-special-file9
-rwxr-xr-xpre-commit.d/30store-metadata18
-rw-r--r--pre-commit.d/README2
5 files changed, 0 insertions, 55 deletions
diff --git a/pre-commit.d/20store-empty-directory b/pre-commit.d/20store-empty-directory
deleted file mode 100755
index e0f9538..0000000
--- a/pre-commit.d/20store-empty-directory
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-set -e
-
-# Make sure the file is not readable by others, since it can leak
-# information about contents of non-readable directories in /etc.
-umask 077
-
-if [ -e .etckeeper ]; then
- egrep -v '^mkdir ' .etckeeper > .etckeeper.new || true
-fi
-find -type d -empty | grep -v /.git/ | sort |
- sed -e "s/^/mkdir -p '/" -e "s/\$/'/" >> .etckeeper.new
-
-if [ ! -e .etckeeper ] || ! cmp -s .etckeeper .etckeeper.new ; then
- mv -f .etckeeper.new .etckeeper
- git add .etckeeper
-else
- rm -f .etckeeper.new
-fi
diff --git a/pre-commit.d/20warn-hardlinks b/pre-commit.d/20warn-hardlinks
deleted file mode 100755
index 3dd7a96..0000000
--- a/pre-commit.d/20warn-hardlinks
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-hardlinks=$(find -type f -not -links 1 | grep -v /.git/) || true
-if [ -n "$hardlinks" ]; then
- echo "etckeeper warning: hardlinked files could cause problems with git:" >&2
- echo "$hardlinks" >&2
-fi
diff --git a/pre-commit.d/20warn-special-file b/pre-commit.d/20warn-special-file
deleted file mode 100755
index cb4d019..0000000
--- a/pre-commit.d/20warn-special-file
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/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
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
deleted file mode 100755
index b878abd..0000000
--- a/pre-commit.d/30store-metadata
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-set -e
-
-# Make sure the file is not readable by others, since it can leak
-# information about contents of non-readable directories in /etc.
-umask 077
-
-# ensure the file exists so that it will list its own metadata
-if [ ! -e .metadata ]; then
- metastore --save
-fi
-
-# metastore doesn't produce the same output file for the same metadata
-# everytime, so avoid changing the file if nothing really changed.
-if [ ! -z "$(metastore --compare)" ]; then
- metastore --save
- git add .metadata
-fi
diff --git a/pre-commit.d/README b/pre-commit.d/README
deleted file mode 100644
index 051d094..0000000
--- a/pre-commit.d/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This is run by a git pre-commit hook before committing changes to the
-repository. This can be used for storing metadata, and for sanity checks.