aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2025-01-03 17:44:21 -0300
committerSilvio Rhatto <rhatto@riseup.net>2025-01-03 17:44:21 -0300
commit3246ad6f501251c34fd4bfdb46001e460cd6536d (patch)
tree020b87c1d7b1650bda03816a8baa3eed46260394 /share
parentc3e26af4cefe5399dc896979c27a1f55c91b027c (diff)
downloadhydra-3246ad6f501251c34fd4bfdb46001e460cd6536d.tar.gz
hydra-3246ad6f501251c34fd4bfdb46001e460cd6536d.tar.bz2
Fix: hydractl: sync-media: run git gc and git prune on git-annex repositories
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/sync-media4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index 17ee219..0976c68 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -248,6 +248,8 @@ for folder in $REPOSITORIES; do
# Repository maintenance
sync_media_fsck
sync_media_dropunused
+ git prune
+ git gc
)
fi
@@ -315,6 +317,8 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
sync_media_getall $VOLUME/$MEDIA/$folder
sync_media_fsck
sync_media_dropunused
+ git gc
+ git prune
#git annex drop --auto --numcopies=2
)
elif [ -d "$CACHE/$folder" ] && [ ! -d "$CACHE/$folder/.git" ]; then