From a49ade2c4a52e45e90a2583e8bc9c653ef42646e Mon Sep 17 00:00:00 2001 From: Randy Stauner Date: Wed, 10 Jul 2024 07:55:56 -0700 Subject: [PATCH] Use git gc to reduce disk usage --- continuous_reporting/gh_tasks/commit_benchmark_data.sh | 2 ++ continuous_reporting/gh_tasks/git_update_yjit_metrics_repo.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/continuous_reporting/gh_tasks/commit_benchmark_data.sh b/continuous_reporting/gh_tasks/commit_benchmark_data.sh index 7aff6f18e..6cc48f242 100755 --- a/continuous_reporting/gh_tasks/commit_benchmark_data.sh +++ b/continuous_reporting/gh_tasks/commit_benchmark_data.sh @@ -37,4 +37,6 @@ git add raw_benchmark_data git commit -m "`uname -p` benchmark results" || echo "Commit is empty?" git push +git gc + echo "Committed and pushed benchmark data successfully." diff --git a/continuous_reporting/gh_tasks/git_update_yjit_metrics_repo.sh b/continuous_reporting/gh_tasks/git_update_yjit_metrics_repo.sh index 99f4f4914..9ed9dec64 100755 --- a/continuous_reporting/gh_tasks/git_update_yjit_metrics_repo.sh +++ b/continuous_reporting/gh_tasks/git_update_yjit_metrics_repo.sh @@ -29,3 +29,7 @@ git fetch current_repo git clean -ffdx git restore -SW . git checkout current_repo/$YJIT_METRICS_NAME + +# All this ref switching can leave cruft in the git database. +# Clean it to keep disk space under control. +git gc