commit - aafafc3e2b185a7a5a890b77d3a55a3283cc5274
commit + 16cd1323a1652e0fb130bfd965e6f930907bd96e
blob - 1a180b0a04b76c153a96b70911093bc61141c9d3
blob + 2798429e876babacc3721592a2208f90615b8299
--- git-repository.5.html
+++ git-repository.5.html
in the <span class="Pa">packed-refs</span> file which contains one reference
definition per line.</p>
<p class="Pp">Any object which is not directly or indirectly reachable via a
- reference is subject to deletion by Git's garbage collector.</p>
+ reference is subject to deletion by Git's garbage collector or
+ <code class="Cm">gotadmin cleanup</code>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>
blob - a1f78d7a80ae038109ddab8f812c034e39293a11
blob + 8f88f9a971c0004540365afc05bf1f03efa41558
--- got-worktree.5.html
+++ got-worktree.5.html
<p class="Pp">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. When a work tree is no longer needed its
- reference can be deleted from the Git repository with <code class="Cm">got
- ref -d</code>.</p>
+ reference prevents the Git garbage collector and <code class="Cm">gotadmin
+ cleanup</code> 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 <code class="Cm">got ref -d</code>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>
blob - f415dc0e8fae12a1b7fe63fb27ae6b06be17f4fc
blob + 770fb11dd8b69572909351aefb4a07dfd00e8f55
--- got.1.html
+++ got.1.html
<var class="Ar">repository-path</var>] [<code class="Fl">-t</code>]
[<code class="Fl">-q</code>] [<code class="Fl">-v</code>]
[<code class="Fl">-R</code> <var class="Ar">reference</var>]
- [<var class="Ar">remote-repository</var>]</dt>
+ [<code class="Fl">-X</code>] [<var class="Ar">remote-repository</var>]</dt>
<dd>Fetch new changes from a remote repository. If no
<var class="Ar">remote-repository</var> is specified,
“origin” will be used. The remote repository's URL is
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. Maintaining custom changes in a mirror repository is
- therefore discouraged.</p>
+ garbage collector or <code class="Cm">gotadmin cleanup</code>.
+ Maintaining custom changes in a mirror repository is therefore
+ discouraged.</p>
<p class="Pp">In any case, references in the “refs/tags/”
namespace will always be fetched and mapped directly to local references
in the same namespace.</p>
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.</dd>
+ garbage collector or <code class="Cm">gotadmin cleanup</code>.</dd>
<dt id="l~2"><a class="permalink" href="#l~2"><code class="Fl">-l</code></a></dt>
<dd>List branches and tags available for fetching from the remote
repository and exit immediately. Cannot be used together with any of
references from the remote repository's
“refs/remotes/” or “refs/got/”
namespace.</p>
+ </dd>
+ <dt id="X"><a class="permalink" href="#X"><code class="Fl">-X</code></a></dt>
+ <dd>Delete all references which correspond to a particular
+ <var class="Ar">remote-repository</var> instead of fetching new
+ changes. This can be useful when a remote repository is being removed
+ from <a class="Xr">got.conf(5)</a>.
+ <p class="Pp">With <code class="Fl">-X</code>, the
+ <var class="Ar">remote-repository</var> argument is mandatory and no
+ other options except <code class="Fl">-r</code>,
+ <code class="Fl">-v</code>, and <code class="Fl">-q</code> are
+ allowed.</p>
+ <p class="Pp">Only references are deleted. Any commit, tree, tag, and
+ blob objects fetched from a remote repository will generally be
+ stored in pack files and may be removed separately with
+ <a class="Xr">git-repack(1)</a> and Git's garbage collector.</p>
</dd>
</dl>
</dd>
<dd>Delete the reference with the specified <var class="Ar">name</var>
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. Cannot be used together with
- any other options except <code class="Fl">-r</code>.</dd>
+ separately with Git's garbage collector or <code class="Cm">gotadmin
+ cleanup</code>. Cannot be used together with any other options except
+ <code class="Fl">-r</code>.</dd>
</dl>
</dd>
<dt id="branch"><a class="permalink" href="#branch"><code class="Cm">branch</code></a>
<dd>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.</dd>
+ separately with Git's garbage collector or <code class="Cm">gotadmin
+ cleanup</code>.</dd>
<dt id="n"><a class="permalink" href="#n"><code class="Fl">-n</code></a></dt>
<dd>Do not switch and update the work tree after creating a new
branch.</dd>
[<code class="Fl">-R</code>] [<code class="Fl">-I</code>]
<var class="Ar">path ...</var></dt>
<dd>Schedule unversioned files in a work tree for addition to the repository
- in the next commit.
+ in the next commit. By default, files which match a <code class="Cm">got
+ status</code> ignore pattern will not be added.
<p class="Pp">The options for <code class="Cm">got add</code> are as
follows:</p>
<dl class="Bl-tag">
<code class="Cm">got add</code> will refuse to run if a specified
<var class="Ar">path</var> is a directory.</dd>
<dt id="I~3"><a class="permalink" href="#I~3"><code class="Fl">-I</code></a></dt>
- <dd>With -R, add files even if they match a <code class="Cm">got
- status</code> ignore pattern.</dd>
+ <dd>Add files even if they match a <code class="Cm">got status</code>
+ ignore pattern.</dd>
</dl>
</dd>
<dt id="remove"><a class="permalink" href="#remove"><code class="Cm">remove</code></a>
<dd>Short alias for <code class="Cm">backout</code>.</dd>
<dt id="rebase"><a class="permalink" href="#rebase"><code class="Cm">rebase</code></a>
[<code class="Fl">-a</code>] [<code class="Fl">-c</code>]
- [<code class="Fl">-l</code>] [<var class="Ar">branch</var>]</dt>
+ [<code class="Fl">-l</code>] [<code class="Fl">-X</code>]
+ [<var class="Ar">branch</var>]</dt>
<dd>Rebase commits on the specified <var class="Ar">branch</var> onto the tip
of the current branch of the work tree. The <var class="Ar">branch</var>
must share common ancestry with the work tree's current branch. Rebasing
commits will remain in the repository and can be viewed with the
<code class="Cm">got rebase -l</code> command. Removal of these
references makes objects which become unreachable via any reference
- subject to removal by Git's garbage collector.</p>
+ subject to removal by Git's garbage collector or
+ <code class="Cm">gotadmin cleanup</code>.</p>
<p class="Pp">While rebasing commits, show the status of each affected file,
using the following status codes:</p>
<table class="Bl-column">
does not require a work tree. None of the other options can be used
together with <code class="Fl">-l</code>.</p>
</dd>
+ <dt id="X~2"><a class="permalink" href="#X~2"><code class="Fl">-X</code></a></dt>
+ <dd>Delete backups created by past rebase operations, represented by
+ references in the “refs/got/backup/rebase” reference
+ namespace.
+ <p class="Pp">If a <var class="Ar">branch</var> is specified, only
+ delete backups which at some point in time represented this branch.
+ Otherwise, delete all references found within
+ “refs/got/backup/rebase”.</p>
+ <p class="Pp">Any commit, tree, tag, and blob objects belonging to
+ deleted backups remain in the repository and may be removed
+ separately with Git's garbage collector or <code class="Cm">gotadmin
+ cleanup</code>.</p>
+ <p class="Pp">If this option is used, <code class="Cm">got rebase</code>
+ does not require a work tree. None of the other options can be used
+ together with <code class="Fl">-X</code>.</p>
+ </dd>
</dl>
</dd>
<dt id="rb"><a class="permalink" href="#rb"><code class="Cm">rb</code></a></dt>
[<code class="Fl">-a</code>] [<code class="Fl">-c</code>]
[<code class="Fl">-f</code>] [<code class="Fl">-F</code>
<var class="Ar">histedit-script</var>] [<code class="Fl">-m</code>]
- [<code class="Fl">-l</code>] [<var class="Ar">branch</var>]</dt>
+ [<code class="Fl">-l</code>] [<code class="Fl">-X</code>]
+ [<var class="Ar">branch</var>]</dt>
<dd>Edit commit history between the work tree's current base commit and the
tip commit of the work tree's current branch.
<p class="Pp">Before starting a <code class="Cm">histedit</code> operation
edited commits will remain in the repository and can be viewed with the
<code class="Cm">got histedit -l</code> command. Removal of these
references makes objects which become unreachable via any reference
- subject to removal by Git's garbage collector.</p>
+ subject to removal by Git's garbage collector or
+ <code class="Cm">gotadmin cleanup</code>.</p>
<p class="Pp">While merging commits, show the status of each affected file,
using the following status codes:</p>
<table class="Bl-column">
<p class="Pp">If this option is used, <code class="Cm">got
histedit</code> does not require a work tree. None of the other
options can be used together with <code class="Fl">-l</code>.</p>
+ </dd>
+ <dt id="X~3"><a class="permalink" href="#X~3"><code class="Fl">-X</code></a></dt>
+ <dd>Delete backups created by past histedit operations, represented by
+ references in the “refs/got/backup/histedit” reference
+ namespace.
+ <p class="Pp">If a <var class="Ar">branch</var> is specified, only
+ delete backups which at some point in time represented this branch.
+ Otherwise, delete all references found within
+ “refs/got/backup/histedit”.</p>
+ <p class="Pp">Any commit, tree, tag, and blob objects belonging to
+ deleted backups remain in the repository and may be removed
+ separately with Git's garbage collector or <code class="Cm">gotadmin
+ cleanup</code>.</p>
+ <p class="Pp">If this option is used, <code class="Cm">got
+ histedit</code> does not require a work tree. None of the other
+ options can be used together with <code class="Fl">-X</code>.</p>
</dd>
</dl>
</dd>
<a class="Xr">git-clone(1)</a> and <a class="Xr">git-fetch(1)</a>.</li>
<li>Writing to remote repositories, over any protocol, requires
<a class="Xr">git-push(1)</a>.</li>
- <li>Packing repositories, which reduces disk space consumption and improves
- read-access performance, requires <a class="Xr">git-repack(1)</a>.</li>
- <li>Exporting data from repositories requires
- <a class="Xr">git-fast-export(1)</a>.</li>
- <li>Importing data into repositories requires
- <a class="Xr">git-fast-import(1)</a>.</li>
- <li>Reducing the size of repositories by removing redundant or unreferenced
- data requires <a class="Xr">git-gc(1)</a>.</li>
<li>The creation of merge commits, i.e. commits with two or more parent
commits, requires <a class="Xr">git-merge(1)</a>.</li>
<li>In situations where files or directories were moved around
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>
blob - 61b389fdde6641905dfe674f8ca24479ecbed957
blob + cfb12a5769afa1275f9ee0baf2367881df6cddf6
--- gotadmin.1.html
+++ gotadmin.1.html
</dd>
<dt id="ls"><a class="permalink" href="#ls"><code class="Cm">ls</code></a></dt>
<dd>Short alias for <code class="Cm">listpack</code>.</dd>
+ <dt id="cleanup"><a class="permalink" href="#cleanup"><code class="Cm">cleanup</code></a>
+ [<code class="Fl">-p</code>] [<code class="Fl">-n</code>]
+ [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
+ [<code class="Fl">-q</code>]</dt>
+ <dd>Purge unreferenced loose objects from the repository and display the
+ amount of disk space which has been freed as a result.
+ <p class="Pp">Unreferenced objects are present in the repository but cannot
+ be reached via any reference in the entire <span class="Pa">refs/</span>
+ namespace.</p>
+ <p class="Pp">Loose objects are stored as individual files beneath the
+ repository's <span class="Pa">objects/</span> directory, spread across
+ 256 sub-directories named after the 256 possible hexadecimal values of
+ the first byte of an object identifier.</p>
+ <p class="Pp">Packed objects stored in pack files under
+ <span class="Pa">objects/pack/</span> will not be purged. However, if
+ redundant copies of packed objects exist in loose form, such redundant
+ copies will be purged.</p>
+ <p class="Pp">Objects will usually become unreferenced as a result of
+ deleting branches or tags with <code class="Cm">got branch -d</code> or
+ <code class="Cm">got tag -d</code>. Deleting arbitrary references with
+ <code class="Cm">got ref -d</code> may also leave unreferenced objects
+ behind.</p>
+ <p class="Pp">In order to determine the set of objects which are referenced,
+ search all references for commit objects and tag objects, and traverse
+ the corresponding tree object hierarchies. Any loose object IDs not
+ encountered during this search are unreferenced and thus subject to
+ removal. Display the number of commits which have been searched to
+ indicate progress.</p>
+ <p class="Pp">References in the <span class="Pa">refs/got</span> namespace
+ may prevent objects from being purged. This includes references in the
+ <span class="Pa">refs/got/worktree</span> namespace created by
+ <code class="Cm">got checkout</code> and <code class="Cm">got
+ update</code>, as well as references in the
+ <span class="Pa">refs/got/backup</span> namespace created by
+ <code class="Cm">got rebase</code> and <code class="Cm">got
+ histedit</code>. <code class="Cm">gotadmin cleanup</code> will only
+ purge corresponding objects once such references have been deleted with
+ <code class="Cm">got ref -d</code>.</p>
+ <p class="Pp">Some Git repositories contain pack index files which lack a
+ corresponding pack file, which is an inconsistent repository state. In
+ such cases, <code class="Cm">gotadmin cleanup -p -n</code> will display
+ a list of affected pack index files. Whenever possible the missing pack
+ files should be restored. If restoring missing pack files is not
+ possible then affected pack index files can be removed with
+ <code class="Cm">gotadmin cleanup -p</code>.</p>
+ <p class="Pp">The “preciousObjects” Git extension is intended
+ to prevent the removal of objects from a repository.
+ <code class="Cm">gotadmin cleanup</code> will refuse to operate on
+ repositories where this extension is active.</p>
+ <p class="Pp">The options for <code class="Cm">gotadmin cleanup</code> are
+ as follows:</p>
+ <dl class="Bl-tag">
+ <dt id="p"><a class="permalink" href="#p"><code class="Fl">-p</code></a></dt>
+ <dd>Instead of purging unreferenced loose objects, remove any pack index
+ files which do not have a corresponding pack file.</dd>
+ <dt id="n"><a class="permalink" href="#n"><code class="Fl">-n</code></a></dt>
+ <dd>Display the usual progress output and summary information but do not
+ actually remove any files from disk.</dd>
+ <dt id="r~3"><a class="permalink" href="#r~3"><code class="Fl">-r</code></a>
+ <var class="Ar">repository-path</var></dt>
+ <dd>Use the repository at the specified path. If not specified, assume the
+ repository is located at or above the current working directory.</dd>
+ <dt id="q"><a class="permalink" href="#q"><code class="Fl">-q</code></a></dt>
+ <dd>Suppress progress reporting and disk space summary output.</dd>
+ </dl>
+ </dd>
+ <dt id="cl"><a class="permalink" href="#cl"><code class="Cm">cl</code></a></dt>
+ <dd>Short alias for <code class="Cm">cleanup</code>.</dd>
</dl>
</section>
<section class="Sh">
<span class="An">Ori Bernstein</span>
<<a class="Mt" href="mailto:ori@openbsd.org">ori@openbsd.org</a>></p>
</section>
+<section class="Sh">
+<h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1>
+<p class="Pp"><code class="Nm">gotadmin</code> is a work-in-progress and some
+ features remain to be implemented.</p>
+<p class="Pp">At present, the user has to fall back on <a class="Xr">git(1)</a>
+ to perform some tasks. In particular:</p>
+<ul class="Bl-bullet">
+ <li>Removing redundant or unreferenced packed objects requires
+ <a class="Xr">git-gc(1)</a> and perhaps
+ <a class="Xr">git-repack(1)</a>.</li>
+ <li>Exporting data from repositories requires
+ <a class="Xr">git-fast-export(1)</a>.</li>
+ <li>Importing data into repositories requires
+ <a class="Xr">git-fast-import(1)</a>.</li>
+</ul>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
+<p class="Pp">Disk space savings reported by <code class="Cm">gotadmin
+ cleanup</code> will be misleading if the repository contains object files
+ that were hard-linked from another repository. Such hard-links will be
+ created by certain <a class="Xr">git(1)</a> commands. By itself,
+ <a class="Xr">got(1)</a> will never create hard-linked object files.</p>
+</section>
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>
blob - 84b29ee2ea53756f4983e7a100dbff9a7685e2a1
blob + 011f90f4a88440f68a85d0f2428b898b0ebdef3d
--- gotweb.8.html
+++ gotweb.8.html
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>
blob - fb2b53a4939dd860ed41037cec5881fe461d84e4
blob + 50baea2dddb65793188e253e507b1ba17c7a4079
--- gotweb.conf.5.html
+++ gotweb.conf.5.html
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>
blob - a3f53e55bb15eef14e2a9411ef8f3016f961d1b4
blob + c3ef08b221c1861f7e0bdd3c95cf3d9ef2a7f707
--- tog.1.html
+++ tog.1.html
</div>
<table class="foot">
<tr>
- <td class="foot-date">June 22, 2021</td>
+ <td class="foot-date">July 26, 2021</td>
<td class="foot-os">OpenBSD 6.9</td>
</tr>
</table>