diff options
author | Josip Sokcevic <sokcevic@chromium.org> | 2024-12-16 22:30:07 +0000 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-12-18 09:23:49 -0800 |
commit | 13d6588bf60f0980ffa3d178441fa707655fee95 (patch) | |
tree | 38d1bd9e2ad3988739576d82d4d6a62ffd69364b /man | |
parent | 9500aca754058bff18ddf35db62852ca4f722c63 (diff) | |
download | git-repo-13d6588bf60f0980ffa3d178441fa707655fee95.tar.gz |
gc: Introduce new command to remove old projectsv2.50.1
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>
Diffstat (limited to 'man')
-rw-r--r-- | man/repo-gc.1 | 43 | ||||
-rw-r--r-- | man/repo-manifest.1 | 20 | ||||
-rw-r--r-- | man/repo.1 | 5 |
3 files changed, 66 insertions, 2 deletions
diff --git a/man/repo-gc.1 b/man/repo-gc.1 new file mode 100644 index 00000000..e465a253 --- /dev/null +++ b/man/repo-gc.1 | |||
@@ -0,0 +1,43 @@ | |||
1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | ||
2 | .TH REPO "1" "December 2024" "repo gc" "Repo Manual" | ||
3 | .SH NAME | ||
4 | repo \- repo gc - manual page for repo gc | ||
5 | .SH SYNOPSIS | ||
6 | .B repo | ||
7 | \fI\,gc\/\fR | ||
8 | .SH DESCRIPTION | ||
9 | Summary | ||
10 | .PP | ||
11 | Cleaning up internal repo state. | ||
12 | .SH OPTIONS | ||
13 | .TP | ||
14 | \fB\-h\fR, \fB\-\-help\fR | ||
15 | show this help message and exit | ||
16 | .TP | ||
17 | \fB\-n\fR, \fB\-\-dry\-run\fR | ||
18 | do everything except actually delete | ||
19 | .TP | ||
20 | \fB\-y\fR, \fB\-\-yes\fR | ||
21 | answer yes to all safe prompts | ||
22 | .SS Logging options: | ||
23 | .TP | ||
24 | \fB\-v\fR, \fB\-\-verbose\fR | ||
25 | show all output | ||
26 | .TP | ||
27 | \fB\-q\fR, \fB\-\-quiet\fR | ||
28 | only show errors | ||
29 | .SS Multi\-manifest options: | ||
30 | .TP | ||
31 | \fB\-\-outer\-manifest\fR | ||
32 | operate starting at the outermost manifest | ||
33 | .TP | ||
34 | \fB\-\-no\-outer\-manifest\fR | ||
35 | do not operate on outer manifests | ||
36 | .TP | ||
37 | \fB\-\-this\-manifest\-only\fR | ||
38 | only operate on this (sub)manifest | ||
39 | .TP | ||
40 | \fB\-\-no\-this\-manifest\-only\fR, \fB\-\-all\-manifests\fR | ||
41 | operate on this manifest and its submanifests | ||
42 | .PP | ||
43 | Run `repo help gc` to view the detailed manual. | ||
diff --git a/man/repo-manifest.1 b/man/repo-manifest.1 index 10ec2e75..2ee23e64 100644 --- a/man/repo-manifest.1 +++ b/man/repo-manifest.1 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
2 | .TH REPO "1" "April 2024" "repo manifest" "Repo Manual" | 2 | .TH REPO "1" "December 2024" "repo manifest" "Repo Manual" |
3 | .SH NAME | 3 | .SH NAME |
4 | repo \- repo manifest - manual page for repo manifest | 4 | repo \- repo manifest - manual page for repo manifest |
5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
@@ -192,11 +192,13 @@ CDATA #IMPLIED> | |||
192 | <!ATTLIST extend\-project remote CDATA #IMPLIED> | 192 | <!ATTLIST extend\-project remote CDATA #IMPLIED> |
193 | <!ATTLIST extend\-project dest\-branch CDATA #IMPLIED> | 193 | <!ATTLIST extend\-project dest\-branch CDATA #IMPLIED> |
194 | <!ATTLIST extend\-project upstream CDATA #IMPLIED> | 194 | <!ATTLIST extend\-project upstream CDATA #IMPLIED> |
195 | <!ATTLIST extend\-project base\-rev CDATA #IMPLIED> | ||
195 | .IP | 196 | .IP |
196 | <!ELEMENT remove\-project EMPTY> | 197 | <!ELEMENT remove\-project EMPTY> |
197 | <!ATTLIST remove\-project name CDATA #IMPLIED> | 198 | <!ATTLIST remove\-project name CDATA #IMPLIED> |
198 | <!ATTLIST remove\-project path CDATA #IMPLIED> | 199 | <!ATTLIST remove\-project path CDATA #IMPLIED> |
199 | <!ATTLIST remove\-project optional CDATA #IMPLIED> | 200 | <!ATTLIST remove\-project optional CDATA #IMPLIED> |
201 | <!ATTLIST remove\-project base\-rev CDATA #IMPLIED> | ||
200 | .IP | 202 | .IP |
201 | <!ELEMENT repo\-hooks EMPTY> | 203 | <!ELEMENT repo\-hooks EMPTY> |
202 | <!ATTLIST repo\-hooks in\-project CDATA #REQUIRED> | 204 | <!ATTLIST repo\-hooks in\-project CDATA #REQUIRED> |
@@ -495,6 +497,14 @@ project. Same syntax as the corresponding element of `project`. | |||
495 | Attribute `upstream`: If specified, overrides the upstream of the original | 497 | Attribute `upstream`: If specified, overrides the upstream of the original |
496 | project. Same syntax as the corresponding element of `project`. | 498 | project. Same syntax as the corresponding element of `project`. |
497 | .PP | 499 | .PP |
500 | Attribute `base\-rev`: If specified, adds a check against the revision to be | ||
501 | extended. Manifest parse will fail and give a list of mismatch extends if the | ||
502 | revisions being extended have changed since base\-rev was set. Intended for use | ||
503 | with layered manifests using hash revisions to prevent patch branches hiding | ||
504 | newer upstream revisions. Also compares named refs like branches or tags but is | ||
505 | misleading if branches are used as base\-rev. Same syntax as the corresponding | ||
506 | element of `project`. | ||
507 | .PP | ||
498 | Element annotation | 508 | Element annotation |
499 | .PP | 509 | .PP |
500 | Zero or more annotation elements may be specified as children of a project or | 510 | Zero or more annotation elements may be specified as children of a project or |
@@ -556,6 +566,14 @@ Logic otherwise behaves like both are specified. | |||
556 | Attribute `optional`: Set to true to ignore remove\-project elements with no | 566 | Attribute `optional`: Set to true to ignore remove\-project elements with no |
557 | matching `project` element. | 567 | matching `project` element. |
558 | .PP | 568 | .PP |
569 | Attribute `base\-rev`: If specified, adds a check against the revision to be | ||
570 | removed. Manifest parse will fail and give a list of mismatch removes if the | ||
571 | revisions being removed have changed since base\-rev was set. Intended for use | ||
572 | with layered manifests using hash revisions to prevent patch branches hiding | ||
573 | newer upstream revisions. Also compares named refs like branches or tags but is | ||
574 | misleading if branches are used as base\-rev. Same syntax as the corresponding | ||
575 | element of `project`. | ||
576 | .PP | ||
559 | Element repo\-hooks | 577 | Element repo\-hooks |
560 | .PP | 578 | .PP |
561 | NB: See the [practical documentation](./repo\-hooks.md) for using repo hooks. | 579 | NB: See the [practical documentation](./repo\-hooks.md) for using repo hooks. |
@@ -1,5 +1,5 @@ | |||
1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
2 | .TH REPO "1" "April 2024" "repo" "Repo Manual" | 2 | .TH REPO "1" "December 2024" "repo" "Repo Manual" |
3 | .SH NAME | 3 | .SH NAME |
4 | repo \- repository management tool built on top of git | 4 | repo \- repository management tool built on top of git |
5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
@@ -79,6 +79,9 @@ Download and checkout a change | |||
79 | forall | 79 | forall |
80 | Run a shell command in each project | 80 | Run a shell command in each project |
81 | .TP | 81 | .TP |
82 | gc | ||
83 | Cleaning up internal repo state. | ||
84 | .TP | ||
82 | grep | 85 | grep |
83 | Print lines matching a pattern | 86 | Print lines matching a pattern |
84 | .TP | 87 | .TP |