mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-30 22:49:48 +00:00
sync: Suggest "git repack -a -d" in bloat warning
The warning suggests running "repo sync --auto-gc" which runs "git gc --auto". Git may decide not to repack if its internal thresholds are not met, leaving the warning active even after running the suggested command. "git repack -a -d" forces all reachable objects into a single pack and deletes redundant packs, reducing the pack count to 1. This guarantees that the warning (which triggers when pack count exceeds 10) goes away. Bug: 505755299 Change-Id: I10163ef8efb7f3b7c5055378ad95051974d11b88 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/580821 Reviewed-by: Becky Siegel <beckysiegel@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Tested-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
committed by
gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
e8deeabf2a
commit
5d8585012f
+2
-2
@@ -2151,8 +2151,8 @@ later is required to fix a server side protocol bug.
|
||||
for project_name in sorted(self._bloated_projects):
|
||||
warn_msg = (
|
||||
f'warning: Project "{project_name}" is accumulating '
|
||||
'unoptimized data. Please run "repo sync --auto-gc" or '
|
||||
'"repo gc --repack" to clean up.'
|
||||
'unoptimized data. Please run "git repack -a -d" in the '
|
||||
'project directory or "repo gc --repack" to clean up.'
|
||||
)
|
||||
self.git_event_log.ErrorEvent(warn_msg)
|
||||
logger.warning(warn_msg)
|
||||
|
||||
Reference in New Issue
Block a user