summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2007-11-05 17:22:04 -0500
committerJoey Hess <joey@kodama.kitenet.net>2007-11-05 17:22:04 -0500
commitc01f3fe97eadce94a2f37908dc57f54d9af5b25a (patch)
treeb04553d480f117ec6ff8579aaab89a066cf76947
parentdf87161ec2d79fc7074cf7bb44f9ac24bed638cc (diff)
fixes
-rwxr-xr-xpre-commit.d/10store-metadata1
-rwxr-xr-xpre-commit.d/10warn-empty-directory2
-rwxr-xr-xpre-commit.d/10warn-hardlinks2
-rwxr-xr-xpre-commit.d/10warn-special-file4
4 files changed, 6 insertions, 3 deletions
diff --git a/pre-commit.d/10store-metadata b/pre-commit.d/10store-metadata
index c1a6c27..322a3ae 100755
--- a/pre-commit.d/10store-metadata
+++ b/pre-commit.d/10store-metadata
@@ -1,3 +1,4 @@
#!/bin/sh
set -e
metastore --save --mtime
+git add .metadata
diff --git a/pre-commit.d/10warn-empty-directory b/pre-commit.d/10warn-empty-directory
index eed41ae..3f6cdaa 100755
--- a/pre-commit.d/10warn-empty-directory
+++ b/pre-commit.d/10warn-empty-directory
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-empty=$(find -type f -empty | grep -v /.git/)
+empty=$(find -type f -empty | grep -v /.git/) || true
if [ -n "$empty" ]; then
echo "etckeeper warning: empty directories, not tracked by git:" >&2
echo "$empty" >&2
diff --git a/pre-commit.d/10warn-hardlinks b/pre-commit.d/10warn-hardlinks
index 29f007b..3dd7a96 100755
--- a/pre-commit.d/10warn-hardlinks
+++ b/pre-commit.d/10warn-hardlinks
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-hardlinks=$(find -type f -not -links 1 | grep -v /.git/)
+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
diff --git a/pre-commit.d/10warn-special-file b/pre-commit.d/10warn-special-file
index aa5c683..cb4d019 100755
--- a/pre-commit.d/10warn-special-file
+++ b/pre-commit.d/10warn-special-file
@@ -1,7 +1,9 @@
#!/bin/sh
set -e
-special=$(find -not -type d -not -type f -not -type l | grep -v /.git/)
+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