mention 'gotadmin cleanup' wherever Git's garbage collector is mentioned
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
diff --git a/got/git-repository.5 b/got/git-repository.5
index a00e65f..be17028 100644
--- a/got/git-repository.5
+++ b/got/git-repository.5
@@ -143,7 +143,8 @@ directory, or in the
file which contains one reference definition per line.
.Pp
Any object which is not directly or indirectly reachable via a reference
-is subject to deletion by Git's garbage collector.
+is subject to deletion by Git's garbage collector or
+.Cm gotadmin cleanup .
.Sh FILES
.Bl -tag -width packed-refs -compact
.It Pa HEAD
diff --git a/got/got-worktree.5 b/got/got-worktree.5
index 220db99..9c86194 100644
--- a/got/got-worktree.5
+++ b/got/got-worktree.5
@@ -146,8 +146,9 @@ file has been exclusively locked with
Each work tree has a universal unique identifier.
When a work tree is checked out or updated, this identifier is used to
create a reference to the current base commit in the Git repository.
-The presence of this reference prevents Git garbage collectors from
-discarding the base commit and any objects it refers to.
+The presence of this reference prevents the Git garbage collector and
+.Cm gotadmin cleanup
+from discarding the base commit and any objects it refers to.
When a work tree is no longer needed its reference can be deleted from
the Git repository with
.Cm got ref -d .
diff --git a/got/got.1 b/got/got.1
index 20d22fb..cc9598e 100644
--- a/got/got.1
+++ b/got/got.1
@@ -355,7 +355,8 @@ namespace will be updated directly to match the corresponding branches in
the remote repository.
If those branches contained local commits, these commits will no longer be
reachable via a reference and will therefore be at risk of being discarded
-by Git's garbage collector.
+by Git's garbage collector or
+.Cm gotadmin cleanup .
Maintaining custom changes in a mirror repository is therefore discouraged.
.Pp
In any case, references in the
@@ -397,7 +398,8 @@ present in the remote repository.
Only references are deleted.
Any commit, tree, tag, and blob objects belonging to deleted branches or
tags remain in the repository and may be removed separately with
-Git's garbage collector.
+Git's garbage collector or
+.Cm gotadmin cleanup .
.It Fl l
List branches and tags available for fetching from the remote repository
and exit immediately.
@@ -976,7 +978,8 @@ Delete the reference with the specified
from the repository.
Any commit, tree, tag, and blob objects belonging to deleted references
remain in the repository and may be removed separately with
-Git's garbage collector.
+Git's garbage collector or
+.Cm gotadmin cleanup .
Cannot be used together with any other options except
.Fl r .
.El
@@ -1051,7 +1054,8 @@ Delete the branch with the specified name from the repository.
Only the branch reference is deleted.
Any commit, tree, and blob objects belonging to the branch
remain in the repository and may be removed separately with
-Git's garbage collector.
+Git's garbage collector or
+.Cm gotadmin cleanup .
.It Fl n
Do not switch and update the work tree after creating a new branch.
.El
@@ -1480,7 +1484,8 @@ commits will remain in the repository and can be viewed with the
.Cm got rebase -l
command.
Removal of these references makes objects which become unreachable via
-any reference subject to removal by Git's garbage collector.
+any reference subject to removal by Git's garbage collector or
+.Cm gotadmin cleanup .
.Pp
While rebasing commits, show the status of each affected file,
using the following status codes:
@@ -1655,7 +1660,8 @@ commits will remain in the repository and can be viewed with the
.Cm got histedit -l
command.
Removal of these references makes objects which become unreachable via
-any reference subject to removal by Git's garbage collector.
+any reference subject to removal by Git's garbage collector or
+.Cm gotadmin cleanup .
.Pp
While merging commits, show the status of each affected file,
using the following status codes:
diff --git a/got/got.c b/got/got.c
index dfb71f8..edd395e 100644
--- a/got/got.c
+++ b/got/got.c
@@ -2563,8 +2563,8 @@ show_worktree_base_ref_warning(void)
{
fprintf(stderr, "%s: warning: could not create a reference "
"to the work tree's base commit; the commit could be "
- "garbage-collected by Git; making the repository "
- "writable and running 'got update' will prevent this\n",
+ "garbage-collected by Git or 'gotadmin cleanup'; making the "
+ "repository writable and running 'got update' will prevent this\n",
getprogname());
}
diff --git a/regress/cmdline/checkout.sh b/regress/cmdline/checkout.sh
index 73b3ac7..b6c5784 100755
--- a/regress/cmdline/checkout.sh
+++ b/regress/cmdline/checkout.sh
@@ -335,8 +335,9 @@ test_checkout_read_only() {
> $testroot/stderr.expected
echo -n "to the work tree's base commit; the commit could " \
>> $testroot/stderr.expected
- echo -n "be garbage-collected by Git; making the repository " \
+ echo -n "be garbage-collected by Git or 'gotadmin cleanup'; " \
>> $testroot/stderr.expected
+ echo -n "making the repository " >> $testroot/stderr.expected
echo "writable and running 'got update' will prevent this" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr