commit e67867107a97eae4801a85636493efb4239a61cd from: Stefan Sperling date: Sat Jul 03 22:08:15 2021 UTC mention 'gotadmin cleanup' wherever Git's garbage collector is mentioned commit - aaf7c34214dd2b9488e35801416816d063be14df commit + e67867107a97eae4801a85636493efb4239a61cd blob - a00e65fb629b0da7326f4a0c9ee4b5994a15de6d blob + be17028e28d2038b9f511fc7562d1249103a1f69 --- got/git-repository.5 +++ 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 blob - 220db990a98d732fa271f299202e4bc5a68f7e67 blob + 9c86194132d8a56b151a824def4930b81db91e83 --- got/got-worktree.5 +++ 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 . blob - 20d22fb05cd6a486df3142e5f966dd8f50fe1ebc blob + cc9598e29205c3fe87df2026697edbe3a56b8e01 --- got/got.1 +++ got/got.1 @@ -355,7 +355,8 @@ namespace will be updated directly to match the corres 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 rep 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 viewe .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 viewe .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 @@ -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()); } blob - 73b3ac7e49a392565db77b20d935db7f61aa2d02 blob + b6c5784556b7f6d287d651006dc0ccee50de3901 --- regress/cmdline/checkout.sh +++ 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