aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/hooks')
-rwxr-xr-xcontrib/hooks/post-save4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/hooks/post-save b/contrib/hooks/post-save
index d68461a..e75ce1e 100755
--- a/contrib/hooks/post-save
+++ b/contrib/hooks/post-save
@@ -4,6 +4,10 @@
# automatically commit any changes to the calcurse data files using Git.
cd "$HOME"/.calcurse/
+
+# Do not make commits when synchronizing with a CalDAV server.
+[ -f caldav/lock ] && exit
+
git add *
if ! git diff-index --quiet --cached HEAD; then
git commit -m "Automatic commit by the post-save hook"