Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion git-reader/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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=""
Expand Down
Loading