diff --git a/git-reader/run.sh b/git-reader/run.sh index c7fb9f22..92b32aa6 100644 --- a/git-reader/run.sh +++ b/git-reader/run.sh @@ -13,7 +13,19 @@ log_sizes() { git_size=$(du -sh "$repo_path/.git/objects" 2>/dev/null | cut -f1) || true lfs_size=$(du -sh "$repo_path/.git/lfs" 2>/dev/null | cut -f1) || true log "Size of $repo_path: ${total_size} (git objects=${git_size:-n/a}, LFS=${lfs_size:-n/a})" - du -sh "$repo_path}/attachments/*/*" | sort -hr | head -n 10 + + local file_count lfs_count + file_count=$(git -C "$repo_path" ls-files | wc -l) + lfs_count=$(git -C "$repo_path" lfs ls-files | wc -l) + log "Number of files: ${file_count} (LFS=${lfs_count})" + + log "Number of tags per collection (top 10):" + git -C "$repo_path" tag | sed 's|/[0-9]*$||' | sort | uniq -c | sort -rn | head -n 10 + echo "..." + + log "Size of attachments folders (top 10):" + du -sh "$repo_path"/attachments/*/* 2>/dev/null | sort -hr | head -n 10 + echo "..." } ORIGIN_NAME="origin" @@ -63,6 +75,8 @@ cmd_gitupdate() { log "Setting latest symlink to A..." ln -sfn "$repo_path/A" "$repo_path/latest" + log_sizes "$repo_path/latest" + # A was just cloned at origin HEAD and B is an exact copy, so there is # nothing to update yet. Return and let the next run pick up changes. LOG_PREFIX=""