]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: hydractl: sync-media: run git gc and git prune on git-annex repositories
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 3 Jan 2025 20:44:21 +0000 (17:44 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 3 Jan 2025 20:44:21 +0000 (17:44 -0300)
share/hydractl/sync-media

index 17ee219945e744d3e17f13838ecc8eed29f9a3c4..0976c6896488ba9176e7c388e477dc2f914ae6ad 100755 (executable)
@@ -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