summaryrefslogtreecommitdiff
path: root/commit.d/30git-add
diff options
context:
space:
mode:
Diffstat (limited to 'commit.d/30git-add')
-rwxr-xr-xcommit.d/30git-add8
1 files changed, 8 insertions, 0 deletions
diff --git a/commit.d/30git-add b/commit.d/30git-add
new file mode 100755
index 0000000..66d96a9
--- /dev/null
+++ b/commit.d/30git-add
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "$VCS" = git ] && [ -d .git ]; then
+ if ! git add .; then
+ echo "etckeeper warning: git add failed" >&2
+ fi
+fi