aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hooks/post-save
blob: e75ce1e0b6d129e4fe2659ebe433bd49befe3b4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
#
# Copy this file into ~/.calcurse/hooks/ and mark it executable to
# 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"
fi