summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/keyringer/actions/check11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/keyringer/actions/check b/lib/keyringer/actions/check
index 098d163..83401b8 100755
--- a/lib/keyringer/actions/check
+++ b/lib/keyringer/actions/check
@@ -27,4 +27,13 @@ source "$LIB" || exit 1
# This should be done here:
# TODO: Check canaries' timestamps, warning by mail if configured by user preferences.
-# TODO: Git maintenance operations.
+
+# Git maintenance operations.
+if [ -d "$BASEDIR/.git" ]; then
+ echo "Running git maintenance operations..."
+ keyringer_exec git "$BASEDIR" fsck
+ keyringer_exec git "$BASEDIR" gc --prune=all
+else
+ echo "Fatal: not a git repository: $BASEDIR"
+ exit 1
+fi