* Add .pwd.lock to default ignores, this file is created by programs
that call getspent().
+ * Add tests for /etc/.git not yet existing and avoid doing bad things.
+ Closes: #451185
+ * If /etc/.git doesn't exist, display a suggestion to run etckeeper-init.
- -- Joey Hess <joeyh@debian.org> Sun, 11 Nov 2007 14:41:40 -0500
+ -- Joey Hess <joeyh@debian.org> Tue, 13 Nov 2007 19:07:14 -0500
etckeeper (0.1) unstable; urgency=low
#!/bin/sh
set -e
-if ! git-add .; then
- echo "etckeeper warning: git-add failed" >&2
+if [ -d .git ]; then
+ if ! git-add .; then
+ echo "etckeeper warning: git-add failed" >&2
+ fi
fi
TAB=" "
-for file in $(git ls-files --deleted); do
- if [ ! -d "$file" ]; then
- git rm "$file"
- fi
-done
+if [ -d .git ]; then
+ for file in $(git ls-files --deleted); do
+ if [ ! -d "$file" ]; then
+ git rm "$file"
+ fi
+ done
+fi
#!/bin/sh
set -e
-# TODO: figure out what packages were acted on by the apt run, and include
-# that info in the commit message
-message="committing changes after apt run"
+if [ -d .git ]; then
-# ignore exit code since it exits nonzero if there is nothing to do
-git commit -m "$message" || true
+ # TODO: figure out what packages were acted on by the apt run, and
+ # include that info in the commit message
+ message="committing changes after apt run"
+
+ # ignore exit code since it exits nonzero if there is nothing to do
+ git commit -m "$message" || true
+fi
#!/bin/sh
set -e
-if ! LANG=C git-status 2>&1 | grep -q "working directory clean"; then
+if [ -d .git ] && ! LANG=C git-status 2>&1 | grep -q "working directory clean"; then
. /usr/share/debconf/confmodule
db_capb escape
db_title etckeeper