summaryrefslogtreecommitdiff
path: root/pre-commit.d
diff options
context:
space:
mode:
Diffstat (limited to 'pre-commit.d')
-rwxr-xr-xpre-commit.d/20warn-hardlinks2
-rwxr-xr-xpre-commit.d/20warn-special-file2
-rwxr-xr-xpre-commit.d/30store-metadata6
3 files changed, 5 insertions, 5 deletions
diff --git a/pre-commit.d/20warn-hardlinks b/pre-commit.d/20warn-hardlinks
index 8716dbd..e82740a 100755
--- a/pre-commit.d/20warn-hardlinks
+++ b/pre-commit.d/20warn-hardlinks
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-if [ "$VCS" = git ] || [ "$VCS" = hg ]; then
+if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
hardlinks=$(find -type f -not -links 1 | grep -v /.git/) || true
if [ -n "$hardlinks" ]; then
echo "etckeeper warning: hardlinked files could cause problems with $VCS:" >&2
diff --git a/pre-commit.d/20warn-special-file b/pre-commit.d/20warn-special-file
index 42e812b..0835687 100755
--- a/pre-commit.d/20warn-special-file
+++ b/pre-commit.d/20warn-special-file
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-if [ "$VCS" = git ] || [ "$VCS" = hg ]; then
+if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
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 $VCS:" >&2
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index 19b4673..7a75344 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-if [ "$VCS" = git ] || [ "$VCS" = hg ]; then
+if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then; then
# Make sure the file is not readable by others, since it can leak
# information about contents of non-readable directories in /etc.
umask 077
@@ -20,7 +20,7 @@ if [ "$VCS" = git ] || [ "$VCS" = hg ]; then
if [ "$VCS" = git ]; then
git add .metadata
fi
- # hg add not done, hg will automatically include the file
- # in the current commit
+ # hg and bzr add not done, they will automatically
+ # include the file in the current commit
fi
fi