commit - aaf7c34214dd2b9488e35801416816d063be14df
commit + e67867107a97eae4801a85636493efb4239a61cd
blob - a00e65fb629b0da7326f4a0c9ee4b5994a15de6d
blob + be17028e28d2038b9f511fc7562d1249103a1f69
--- got/git-repository.5
+++ got/git-repository.5
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
blob - 220db990a98d732fa271f299202e4bc5a68f7e67
blob + 9c86194132d8a56b151a824def4930b81db91e83
--- got/got-worktree.5
+++ got/got-worktree.5
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 .
blob - 20d22fb05cd6a486df3142e5f966dd8f50fe1ebc
blob + cc9598e29205c3fe87df2026697edbe3a56b8e01
--- got/got.1
+++ got/got.1
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
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.
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
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
.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:
.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:
blob - dfb71f8e038399997f268b6da9d7314b9fdb0669
blob + edd395ed589265482e441455dfb7bdf7047df17a
--- got/got.c
+++ got/got.c
{
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());
}
blob - 73b3ac7e49a392565db77b20d935db7f61aa2d02
blob + b6c5784556b7f6d287d651006dc0ccee50de3901
--- regress/cmdline/checkout.sh
+++ regress/cmdline/checkout.sh
> $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