1
0
Fork 0

gc: Introduce new command to remove old projects

When projects are removed from manifest, they are only removed from
worktree and not from .repo/projects and .repo/project-objects. Keeping
data under .repo can be desired if user expects deleted projects to be
restored (e.g. checking out a release branch).

Android has ongoing effort to remove many stale projects and this change
allows users to easily free-up their disk space.

Bug: b/344018971
Bug: 40013312
Change-Id: Id23c7524a88082ee6db908f9fd69dcd5d0c4f681
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/445921
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Tested-by: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
Josip Sokcevic 2024-12-16 22:30:07 +00:00 committed by LUCI
parent 9500aca754
commit 13d6588bf6
4 changed files with 193 additions and 2 deletions

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
.TH REPO "1" "April 2024" "repo" "Repo Manual"
.TH REPO "1" "December 2024" "repo" "Repo Manual"
.SH NAME
repo \- repository management tool built on top of git
.SH SYNOPSIS
@ -79,6 +79,9 @@ Download and checkout a change
forall
Run a shell command in each project
.TP
gc
Cleaning up internal repo state.
.TP
grep
Print lines matching a pattern
.TP