summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog5
-rwxr-xr-xinit.d/50vcs-pre-commit-hook8
2 files changed, 9 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 118480b..60417f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,11 @@
etckeeper (0.21) UNRELEASED; urgency=low
* Swedish debconf translation from Martin Ă…gren. Closes: #492063
+ * Make etckeeper init -d set up commit hooks that call etckeeper -d.
+ (Note that if you've relied on it setting up such commit hooks for a repo
+ outside of /etc already, it created broken ones that need to be fixed to use
+ -d.)
+ Thanks, Wolfgang Karall.
-- Joey Hess <joeyh@debian.org> Wed, 23 Jul 2008 13:13:57 -0400
diff --git a/init.d/50vcs-pre-commit-hook b/init.d/50vcs-pre-commit-hook
index 5c63254..de496fe 100755
--- a/init.d/50vcs-pre-commit-hook
+++ b/init.d/50vcs-pre-commit-hook
@@ -5,27 +5,27 @@ case "$VCS" in
git)
if [ -x .git/hooks/pre-commit ]; then
if ! grep -q "etckeeper pre-commit" .git/hooks/pre-commit; then
- echo "etckeeper warning: .git/hooks/pre-commit needs to be manually modified to run: etckeeper pre-commit `pwd`" >&2
+ echo "etckeeper warning: .git/hooks/pre-commit needs to be manually modified to run: etckeeper pre-commit -d `pwd`" >&2
fi
else
cat >.git/hooks/pre-commit <<EOF
#!/bin/sh
# pre-commit hook for etckeeper, to store metadata and do sanity checks
set -e
-etckeeper pre-commit `pwd`
+etckeeper pre-commit -d `pwd`
EOF
chmod +x .git/hooks/pre-commit
fi
;;
hg)
if [ -e .hg/hgrc ] && grep "^\[hooks\]" .hg/hgrc; then
- echo "etckeeper warning: [hooks] section in .hg/hgrc needs to be manually modified to run: etckeeper pre-commit `pwd`" >&2
+ echo "etckeeper warning: [hooks] section in .hg/hgrc needs to be manually modified to run: etckeeper pre-commit -d `pwd`" >&2
else
touch .hg/hgrc
cat >>.hg/hgrc <<EOF
[hooks]
# pre-commit hook for etckeeper, to store metadata and do sanity checks
-precommit = etckeeper pre-commit `pwd`
+precommit = etckeeper pre-commit -d `pwd`
EOF
fi
;;