1 a954aa0a 2021-06-22 stsp <!DOCTYPE html>
4 63657f42 2022-09-07 stsp <meta charset="utf-8"/>
5 63657f42 2022-09-07 stsp <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6 63657f42 2022-09-07 stsp <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
7 63657f42 2022-09-07 stsp <title>GOTADMIN(1)</title>
9 a954aa0a 2021-06-22 stsp <!-- This is an automatically generated file. Do not edit.
10 a954aa0a 2021-06-22 stsp Copyright (c) 2021 Stefan Sperling
12 a954aa0a 2021-06-22 stsp Permission to use, copy, modify, and distribute this software for any
13 a954aa0a 2021-06-22 stsp purpose with or without fee is hereby granted, provided that the above
14 a954aa0a 2021-06-22 stsp copyright notice and this permission notice appear in all copies.
16 a954aa0a 2021-06-22 stsp THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 a954aa0a 2021-06-22 stsp WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 a954aa0a 2021-06-22 stsp MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 a954aa0a 2021-06-22 stsp ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 a954aa0a 2021-06-22 stsp WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 a954aa0a 2021-06-22 stsp ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 a954aa0a 2021-06-22 stsp OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 63657f42 2022-09-07 stsp <div class="head" role="doc-pageheader" aria-label="Manual header
26 63657f42 2022-09-07 stsp line"><span class="head-ltitle">GOTADMIN(1)</span>
27 63657f42 2022-09-07 stsp <span class="head-vol">General Commands Manual</span>
28 63657f42 2022-09-07 stsp <span class="head-rtitle">GOTADMIN(1)</span></div>
29 63657f42 2022-09-07 stsp <main class="manual-text">
30 a954aa0a 2021-06-22 stsp <section class="Sh">
31 63657f42 2022-09-07 stsp <h2 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h2>
32 63657f42 2022-09-07 stsp <p class="Pp"><code class="Nm">gotadmin</code> —
33 63657f42 2022-09-07 stsp <span class="Nd" role="doc-subtitle">Game of Trees repository
34 63657f42 2022-09-07 stsp administration</span></p>
36 a954aa0a 2021-06-22 stsp <section class="Sh">
37 63657f42 2022-09-07 stsp <h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h2>
38 a954aa0a 2021-06-22 stsp <table class="Nm">
40 a954aa0a 2021-06-22 stsp <td><code class="Nm">gotadmin</code></td>
41 742bb3a1 2022-10-24 stsp <td>[<code class="Fl">-hV</code>] <var class="Ar">command</var>
42 a954aa0a 2021-06-22 stsp [<var class="Ar">arg ...</var>]</td>
46 a954aa0a 2021-06-22 stsp <section class="Sh">
47 63657f42 2022-09-07 stsp <h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h2>
48 a954aa0a 2021-06-22 stsp <p class="Pp"><code class="Nm">gotadmin</code> is the repository maintenance
49 376d4d52 2022-07-04 stsp tool for the <a class="Xr" aria-label="got, section 1">got(1)</a> version
50 376d4d52 2022-07-04 stsp control system.</p>
51 376d4d52 2022-07-04 stsp <p class="Pp"><a class="Xr" aria-label="got, section 1">got(1)</a> stores the
52 376d4d52 2022-07-04 stsp history of tracked files in a Git repository, as used by the Git version
53 376d4d52 2022-07-04 stsp control system. <code class="Nm">gotadmin</code> provides commands for
54 376d4d52 2022-07-04 stsp inspecting and manipulating the on-disk state of Git repositories. The
55 376d4d52 2022-07-04 stsp repository format is described in <a class="Xr" aria-label="git-repository,
56 376d4d52 2022-07-04 stsp section 5">git-repository(5)</a>.</p>
57 a954aa0a 2021-06-22 stsp <p class="Pp"><code class="Nm">gotadmin</code> provides global and
58 a954aa0a 2021-06-22 stsp command-specific options. Global options must precede the command name, and
59 a954aa0a 2021-06-22 stsp are as follows:</p>
60 a954aa0a 2021-06-22 stsp <dl class="Bl-tag">
61 a954aa0a 2021-06-22 stsp <dt id="h"><a class="permalink" href="#h"><code class="Fl">-h</code></a></dt>
62 a954aa0a 2021-06-22 stsp <dd>Display usage information and exit immediately.</dd>
63 a954aa0a 2021-06-22 stsp <dt id="V"><a class="permalink" href="#V"><code class="Fl">-V</code></a>,
64 a954aa0a 2021-06-22 stsp <code class="Fl">--version</code></dt>
65 a954aa0a 2021-06-22 stsp <dd>Display program version and exit immediately.</dd>
67 a954aa0a 2021-06-22 stsp <p class="Pp">The commands for <code class="Nm">gotadmin</code> are as
68 a954aa0a 2021-06-22 stsp follows:</p>
69 a954aa0a 2021-06-22 stsp <dl class="Bl-tag">
70 51683866 2022-07-14 stsp <dt id="init"><a class="permalink" href="#init"><code class="Cm">init</code></a>
71 b183145b 2024-08-14 op [<code class="Fl">-A</code> <var class="Ar">hashing-algorithm</var>]
72 3cde8558 2022-09-23 stsp [<code class="Fl">-b</code> <var class="Ar">branch</var>]
73 51683866 2022-07-14 stsp <var class="Ar">repository-path</var></dt>
74 51683866 2022-07-14 stsp <dd>Create a new empty repository at the specified
75 51683866 2022-07-14 stsp <var class="Ar">repository-path</var>.
76 56f3f26e 2024-06-03 stsp <p class="Pp">After <code class="Cm">gotadmin init</code>, the new
77 56f3f26e 2024-06-03 stsp repository must be populated before <code class="Cm">got checkout</code>
78 56f3f26e 2024-06-03 stsp can be used. The <code class="Cm">got import</code> command can be used
79 56f3f26e 2024-06-03 stsp to populate the new repository with data from a local directory.
80 56f3f26e 2024-06-03 stsp Alternatively, on a server running <a class="Xr" aria-label="gotd,
81 56f3f26e 2024-06-03 stsp section 8">gotd(8)</a>, the new repository can be made available to
82 56f3f26e 2024-06-03 stsp <a class="Xr" aria-label="got, section 1">got(1)</a> or
83 56f3f26e 2024-06-03 stsp <a class="Xr" aria-label="git, section 1">git(1)</a> clients by adding
84 56f3f26e 2024-06-03 stsp the repository to <a class="Xr" aria-label="gotd.conf, section
85 56f3f26e 2024-06-03 stsp 5">gotd.conf(5)</a> and restarting <a class="Xr" aria-label="gotd,
86 56f3f26e 2024-06-03 stsp section 8">gotd(8)</a>. Clients may then clone the new repository from
87 56f3f26e 2024-06-03 stsp the server, populate the cloned repository, and then populate the new
88 56f3f26e 2024-06-03 stsp repository on the server via <code class="Cm">got send</code> or
89 56f3f26e 2024-06-03 stsp <code class="Cm">git push</code>.</p>
90 3cde8558 2022-09-23 stsp <p class="Pp">The options for <code class="Cm">gotadmin init</code> are as
91 3cde8558 2022-09-23 stsp follows:</p>
92 3cde8558 2022-09-23 stsp <dl class="Bl-tag">
93 b183145b 2024-08-14 op <dt id="A"><a class="permalink" href="#A"><code class="Fl">-A</code></a>
94 b183145b 2024-08-14 op <var class="Ar">hashing-algorithm</var></dt>
95 b183145b 2024-08-14 op <dd>Configure the repository's <var class="Ar">hashing-algorithm</var>
96 b183145b 2024-08-14 op used for the computation of Git object IDs. Possible values are
97 b183145b 2024-08-14 op <code class="Cm">sha1</code> (the default) or
98 b183145b 2024-08-14 op <code class="Cm">sha256</code>.</dd>
99 3cde8558 2022-09-23 stsp <dt id="b"><a class="permalink" href="#b"><code class="Fl">-b</code></a>
100 3cde8558 2022-09-23 stsp <var class="Ar">branch</var></dt>
101 3cde8558 2022-09-23 stsp <dd>Make the repository's HEAD reference point to the specified
102 3cde8558 2022-09-23 stsp <var class="Ar">branch</var> instead of the default branch
103 3cde8558 2022-09-23 stsp “main”.</dd>
105 56f3f26e 2024-06-03 stsp <p class="Pp">The <code class="Cm">gotadmin init</code> command is
106 56f3f26e 2024-06-03 stsp equivalent to <code class="Cm">got init</code>.</p>
108 a954aa0a 2021-06-22 stsp <dt id="info"><a class="permalink" href="#info"><code class="Cm">info</code></a>
109 a954aa0a 2021-06-22 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]</dt>
110 a954aa0a 2021-06-22 stsp <dd>Display information about a repository. This includes some configuration
111 376d4d52 2022-07-04 stsp settings from <a class="Xr" aria-label="got.conf, section
112 b183145b 2024-08-14 op 5">got.conf(5)</a>, the object ID hashing algorithm, and the number of
113 b183145b 2024-08-14 op objects stored in the repository, in packed or loose form, as well as the
114 b183145b 2024-08-14 op current on-disk size of these objects.
115 a954aa0a 2021-06-22 stsp <p class="Pp">The options for <code class="Cm">gotadmin info</code> are as
116 a954aa0a 2021-06-22 stsp follows:</p>
117 a954aa0a 2021-06-22 stsp <dl class="Bl-tag">
118 a954aa0a 2021-06-22 stsp <dt id="r"><a class="permalink" href="#r"><code class="Fl">-r</code></a>
119 a954aa0a 2021-06-22 stsp <var class="Ar">repository-path</var></dt>
120 a954aa0a 2021-06-22 stsp <dd>Use the repository at the specified path. If not specified, assume the
121 46043f6f 2021-11-23 stsp repository is located at or above the current working directory. If
122 376d4d52 2022-07-04 stsp this directory is a <a class="Xr" aria-label="got, section
123 376d4d52 2022-07-04 stsp 1">got(1)</a> work tree, use the repository path associated with this
124 376d4d52 2022-07-04 stsp work tree.</dd>
127 a954aa0a 2021-06-22 stsp <dt id="pack"><a class="permalink" href="#pack"><code class="Cm">pack</code></a>
128 f6a6fa94 2023-02-22 stsp [<code class="Fl">-aDq</code>] [<code class="Fl">-r</code>
129 a954aa0a 2021-06-22 stsp <var class="Ar">repository-path</var>] [<code class="Fl">-x</code>
130 63657f42 2022-09-07 stsp <var class="Ar">reference</var>] [<var class="Ar">reference ...</var>]</dt>
131 a954aa0a 2021-06-22 stsp <dd>Generate a new pack file and a corresponding pack file index. By default,
132 a954aa0a 2021-06-22 stsp add any loose objects which are reachable via any references to the
133 a954aa0a 2021-06-22 stsp generated pack file.
134 a954aa0a 2021-06-22 stsp <p class="Pp">If one or more <var class="Ar">reference</var> arguments is
135 a954aa0a 2021-06-22 stsp specified, only add objects which are reachable via the specified
136 a954aa0a 2021-06-22 stsp references. Each <var class="Ar">reference</var> argument may either
137 a954aa0a 2021-06-22 stsp specify a specific reference or a reference namespace, in which case all
138 a954aa0a 2021-06-22 stsp references within this namespace will be used.</p>
139 a954aa0a 2021-06-22 stsp <p class="Pp"><code class="Cm">gotadmin pack</code> always ignores
140 a954aa0a 2021-06-22 stsp references in the <span class="Pa">refs/got/</span> namespace,
141 a954aa0a 2021-06-22 stsp effectively treating such references as if they did not refer to any
142 a954aa0a 2021-06-22 stsp objects.</p>
143 a954aa0a 2021-06-22 stsp <p class="Pp">The options for <code class="Cm">gotadmin pack</code> are as
144 a954aa0a 2021-06-22 stsp follows:</p>
145 a954aa0a 2021-06-22 stsp <dl class="Bl-tag">
146 a954aa0a 2021-06-22 stsp <dt id="a"><a class="permalink" href="#a"><code class="Fl">-a</code></a></dt>
147 a954aa0a 2021-06-22 stsp <dd>Add objects to the generated pack file even if they are already packed
148 a954aa0a 2021-06-22 stsp in a different pack file. Unless this option is specified, only loose
149 a954aa0a 2021-06-22 stsp objects will be added.</dd>
150 f6a6fa94 2023-02-22 stsp <dt id="D"><a class="permalink" href="#D"><code class="Fl">-D</code></a></dt>
151 f6a6fa94 2023-02-22 stsp <dd>Force the use of ref-delta representation for deltified objects. If
152 f6a6fa94 2023-02-22 stsp this option is not specified, offset-deltas will be used to represent
153 f6a6fa94 2023-02-22 stsp deltified objects.</dd>
154 63657f42 2022-09-07 stsp <dt id="q"><a class="permalink" href="#q"><code class="Fl">-q</code></a></dt>
155 63657f42 2022-09-07 stsp <dd>Suppress progress reporting output.</dd>
156 a954aa0a 2021-06-22 stsp <dt id="r~2"><a class="permalink" href="#r~2"><code class="Fl">-r</code></a>
157 a954aa0a 2021-06-22 stsp <var class="Ar">repository-path</var></dt>
158 a954aa0a 2021-06-22 stsp <dd>Use the repository at the specified path. If not specified, assume the
159 46043f6f 2021-11-23 stsp repository is located at or above the current working directory. If
160 376d4d52 2022-07-04 stsp this directory is a <a class="Xr" aria-label="got, section
161 376d4d52 2022-07-04 stsp 1">got(1)</a> work tree, use the repository path associated with this
162 376d4d52 2022-07-04 stsp work tree.</dd>
163 a954aa0a 2021-06-22 stsp <dt id="x"><a class="permalink" href="#x"><code class="Fl">-x</code></a>
164 a954aa0a 2021-06-22 stsp <var class="Ar">reference</var></dt>
165 a954aa0a 2021-06-22 stsp <dd>Exclude objects reachable via the specified
166 a954aa0a 2021-06-22 stsp <var class="Ar">reference</var> from the pack file. The
167 a954aa0a 2021-06-22 stsp <var class="Ar">reference</var> argument may either specify a specific
168 a954aa0a 2021-06-22 stsp reference or a reference namespace, in which case all references
169 a954aa0a 2021-06-22 stsp within this namespace will be excluded. The <code class="Fl">-x</code>
170 a954aa0a 2021-06-22 stsp option may be specified multiple times to build a list of references
171 a954aa0a 2021-06-22 stsp to exclude.
172 a954aa0a 2021-06-22 stsp <p class="Pp">Exclusion takes precedence over inclusion. If a reference
173 a954aa0a 2021-06-22 stsp appears in both the included and excluded lists, it will be
174 a954aa0a 2021-06-22 stsp excluded.</p>
178 63b69821 2021-10-16 stsp <dt id="ix"><a class="permalink" href="#indexpack"><code class="Cm" id="indexpack">indexpack</code></a>
179 a954aa0a 2021-06-22 stsp <var class="Ar">packfile-path</var></dt>
181 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
182 46043f6f 2021-11-23 stsp <code class="Cm">ix</code>)</code></div>
183 46043f6f 2021-11-23 stsp Create a pack index for the pack file at
184 a954aa0a 2021-06-22 stsp <var class="Ar">packfile-path</var>.
185 a954aa0a 2021-06-22 stsp <p class="Pp">A pack index is required for using the corresponding pack file
186 376d4d52 2022-07-04 stsp with <a class="Xr" aria-label="got, section 1">got(1)</a>. Usually, a
187 376d4d52 2022-07-04 stsp pack index will be created by commands such as <code class="Cm">gotadmin
188 376d4d52 2022-07-04 stsp pack</code> or <code class="Cm">got fetch</code> as part of regular
189 376d4d52 2022-07-04 stsp operation. The <code class="Cm">gotadmin indexpack</code> command may be
190 376d4d52 2022-07-04 stsp used to recover from a corrupt or missing index. A given pack file will
191 376d4d52 2022-07-04 stsp always yield the same bit-identical index.</p>
192 a954aa0a 2021-06-22 stsp <p class="Pp">The provided <var class="Ar">packfile-path</var> must be
193 a954aa0a 2021-06-22 stsp located within the <span class="Pa">objects/pack/</span> directory of
194 a954aa0a 2021-06-22 stsp the repository and should end in <span class="Pa">.pack</span>. The
195 a954aa0a 2021-06-22 stsp filename of the corresponding pack index is equivalent, except that it
196 a954aa0a 2021-06-22 stsp ends in <span class="Pa">.idx</span>.</p>
198 63b69821 2021-10-16 stsp <dt id="ls"><a class="permalink" href="#listpack"><code class="Cm" id="listpack">listpack</code></a>
199 63657f42 2022-09-07 stsp [<code class="Fl">-hs</code>] <var class="Ar">packfile-path</var></dt>
201 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
202 46043f6f 2021-11-23 stsp <code class="Cm">ls</code>)</code></div>
203 46043f6f 2021-11-23 stsp List the contents of the pack file at <var class="Ar">packfile-path</var>.
204 a954aa0a 2021-06-22 stsp <p class="Pp">Each object contained in the pack file will be displayed on a
205 a954aa0a 2021-06-22 stsp single line. The information shown includes the object ID, object type,
206 a954aa0a 2021-06-22 stsp object offset, and object size.</p>
207 b078d5c4 2022-03-23 stsp <p class="Pp">If a packed object is deltified against another object, the
208 a954aa0a 2021-06-22 stsp delta base will be shown as well. For offset deltas, the delta base is
209 a954aa0a 2021-06-22 stsp identified via an offset into the pack file. For reference deltas, the
210 a954aa0a 2021-06-22 stsp delta base is identified via an object ID.</p>
211 a954aa0a 2021-06-22 stsp <p class="Pp">The provided <var class="Ar">packfile-path</var> must be
212 a954aa0a 2021-06-22 stsp located within the <span class="Pa">objects/pack/</span> directory of
213 b078d5c4 2022-03-23 stsp the repository and should end in <span class="Pa">.pack</span>. The
214 b078d5c4 2022-03-23 stsp corresponding pack index must exist and can be created with
215 b078d5c4 2022-03-23 stsp <code class="Cm">gotadmin indexpack</code> if it is missing.</p>
216 a954aa0a 2021-06-22 stsp <p class="Pp">The options for <code class="Cm">gotadmin listpack</code> are
217 a954aa0a 2021-06-22 stsp as follows:</p>
218 a954aa0a 2021-06-22 stsp <dl class="Bl-tag">
219 a954aa0a 2021-06-22 stsp <dt id="h~2"><a class="permalink" href="#h~2"><code class="Fl">-h</code></a></dt>
220 a954aa0a 2021-06-22 stsp <dd>Show object sizes in human-readable form.</dd>
221 a954aa0a 2021-06-22 stsp <dt id="s"><a class="permalink" href="#s"><code class="Fl">-s</code></a></dt>
222 a954aa0a 2021-06-22 stsp <dd>Display statistics about the pack file after listing objects. This
223 a954aa0a 2021-06-22 stsp includes the total number of objects stored in the pack file and a
224 a954aa0a 2021-06-22 stsp break-down of the number of objects per object type.</dd>
227 63b69821 2021-10-16 stsp <dt id="cl"><a class="permalink" href="#cleanup"><code class="Cm" id="cleanup">cleanup</code></a>
228 63657f42 2022-09-07 stsp [<code class="Fl">-anpq</code>] [<code class="Fl">-r</code>
229 63657f42 2022-09-07 stsp <var class="Ar">repository-path</var>]</dt>
231 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
232 46043f6f 2021-11-23 stsp <code class="Cm">cl</code>)</code></div>
233 41ae98c9 2023-06-23 stsp Purge unreferenced loose objects and redundant pack files from the
234 41ae98c9 2023-06-23 stsp repository and display the amount of disk space which has been freed as a
236 16cd1323 2021-07-26 stsp <p class="Pp">Unreferenced objects are present in the repository but cannot
237 16cd1323 2021-07-26 stsp be reached via any reference in the entire <span class="Pa">refs/</span>
238 41ae98c9 2023-06-23 stsp namespace. Objects will usually become unreferenced as a result of
239 41ae98c9 2023-06-23 stsp deleting branches, tags, or other references with <code class="Cm">got
240 41ae98c9 2023-06-23 stsp branch -d</code>, <code class="Cm">got ref -d</code>, or
241 41ae98c9 2023-06-23 stsp <code class="Cm">got fetch -X</code>.</p>
242 16cd1323 2021-07-26 stsp <p class="Pp">Loose objects are stored as individual files beneath the
243 16cd1323 2021-07-26 stsp repository's <span class="Pa">objects/</span> directory, spread across
244 16cd1323 2021-07-26 stsp 256 sub-directories named after the 256 possible hexadecimal values of
245 16cd1323 2021-07-26 stsp the first byte of an object identifier.</p>
246 41ae98c9 2023-06-23 stsp <p class="Pp">Packed objects are stored in pack files under
247 41ae98c9 2023-06-23 stsp <span class="Pa">objects/pack/</span>.</p>
248 41ae98c9 2023-06-23 stsp <p class="Pp">If redundant copies of packed objects exist in loose form,
249 41ae98c9 2023-06-23 stsp such redundant copies will be purged. If all the objects of a pack file
250 41ae98c9 2023-06-23 stsp are present in other pack files, the redundant pack file will be purged.
251 41ae98c9 2023-06-23 stsp Pack files will usually become redundant as a result of repacking the
252 41ae98c9 2023-06-23 stsp repository with <code class="Nm">gotadmin</code>
253 41ae98c9 2023-06-23 stsp <code class="Cm">pack</code> <code class="Fl">-a</code>.</p>
254 16cd1323 2021-07-26 stsp <p class="Pp">References in the <span class="Pa">refs/got</span> namespace
255 16cd1323 2021-07-26 stsp may prevent objects from being purged. This includes references in the
256 16cd1323 2021-07-26 stsp <span class="Pa">refs/got/worktree</span> namespace created by
257 16cd1323 2021-07-26 stsp <code class="Cm">got checkout</code> and <code class="Cm">got
258 16cd1323 2021-07-26 stsp update</code>, as well as references in the
259 16cd1323 2021-07-26 stsp <span class="Pa">refs/got/backup</span> namespace created by
260 16cd1323 2021-07-26 stsp <code class="Cm">got rebase</code> and <code class="Cm">got
261 16cd1323 2021-07-26 stsp histedit</code>. <code class="Cm">gotadmin cleanup</code> will only
262 16cd1323 2021-07-26 stsp purge corresponding objects once such references have been deleted with
263 41ae98c9 2023-06-23 stsp <code class="Cm">got rebase -X</code>, <code class="Cm">got histedit
264 41ae98c9 2023-06-23 stsp -X</code>, or <code class="Cm">got ref -d</code>.</p>
265 41ae98c9 2023-06-23 stsp <p class="Pp">The “preciousObjects” Git extension is intended
266 41ae98c9 2023-06-23 stsp to prevent the removal of objects from a repository.
267 41ae98c9 2023-06-23 stsp <code class="Cm">gotadmin cleanup</code> will refuse to operate on
268 41ae98c9 2023-06-23 stsp repositories where this extension is active.</p>
269 41ae98c9 2023-06-23 stsp <p class="Pp">For compatibility with Git, if a file with the extension
270 41ae98c9 2023-06-23 stsp <span class="Pa">.keep</span> exists and corresponds to a pack file with
271 41ae98c9 2023-06-23 stsp the extension <span class="Pa">.pack</span> then this pack file will not
272 41ae98c9 2023-06-23 stsp be removed.</p>
273 16cd1323 2021-07-26 stsp <p class="Pp">Some Git repositories contain pack index files which lack a
274 16cd1323 2021-07-26 stsp corresponding pack file, which is an inconsistent repository state. In
275 16cd1323 2021-07-26 stsp such cases, <code class="Cm">gotadmin cleanup -p -n</code> will display
276 b078d5c4 2022-03-23 stsp a list of affected pack index files. Whenever possible, the missing pack
277 16cd1323 2021-07-26 stsp files should be restored. If restoring missing pack files is not
278 b078d5c4 2022-03-23 stsp possible, then affected pack index files can be removed with
279 16cd1323 2021-07-26 stsp <code class="Cm">gotadmin cleanup -p</code>.</p>
280 16cd1323 2021-07-26 stsp <p class="Pp">The options for <code class="Cm">gotadmin cleanup</code> are
281 16cd1323 2021-07-26 stsp as follows:</p>
282 16cd1323 2021-07-26 stsp <dl class="Bl-tag">
283 def5be4a 2021-08-31 stsp <dt id="a~2"><a class="permalink" href="#a~2"><code class="Fl">-a</code></a></dt>
284 c8cf51c9 2023-11-29 stsp <dd>Delete all redundant loose and packed objects. By default, objects
285 c8cf51c9 2023-11-29 stsp which are newer than an implementation-defined modification timestamp
286 c8cf51c9 2023-11-29 stsp are kept on disk to prevent race conditions with other commands that
287 c8cf51c9 2023-11-29 stsp add new objects to the repository while <code class="Cm">gotadmin
288 c8cf51c9 2023-11-29 stsp cleanup</code> is running.</dd>
289 16cd1323 2021-07-26 stsp <dt id="n"><a class="permalink" href="#n"><code class="Fl">-n</code></a></dt>
290 16cd1323 2021-07-26 stsp <dd>Display the usual progress output and summary information but do not
291 16cd1323 2021-07-26 stsp actually remove any files from disk.</dd>
292 63657f42 2022-09-07 stsp <dt id="p"><a class="permalink" href="#p"><code class="Fl">-p</code></a></dt>
293 41ae98c9 2023-06-23 stsp <dd>Instead of purging unreferenced loose objects and redundant pack
294 41ae98c9 2023-06-23 stsp files, remove any pack index files which do not have a corresponding
295 41ae98c9 2023-06-23 stsp pack file.</dd>
296 63657f42 2022-09-07 stsp <dt id="q~2"><a class="permalink" href="#q~2"><code class="Fl">-q</code></a></dt>
297 63657f42 2022-09-07 stsp <dd>Suppress progress reporting and disk space summary output.</dd>
298 16cd1323 2021-07-26 stsp <dt id="r~3"><a class="permalink" href="#r~3"><code class="Fl">-r</code></a>
299 16cd1323 2021-07-26 stsp <var class="Ar">repository-path</var></dt>
300 16cd1323 2021-07-26 stsp <dd>Use the repository at the specified path. If not specified, assume the
301 46043f6f 2021-11-23 stsp repository is located at or above the current working directory. If
302 376d4d52 2022-07-04 stsp this directory is a <a class="Xr" aria-label="got, section
303 376d4d52 2022-07-04 stsp 1">got(1)</a> work tree, use the repository path associated with this
304 376d4d52 2022-07-04 stsp work tree.</dd>
307 461d9094 2023-07-19 stsp <dt id="dump"><a class="permalink" href="#dump"><code class="Cm">dump</code></a>
308 461d9094 2023-07-19 stsp [<code class="Fl">-q</code>] [<code class="Fl">-r</code>
309 461d9094 2023-07-19 stsp <var class="Ar">repository-path</var>] [<code class="Fl">-x</code>
310 461d9094 2023-07-19 stsp <var class="Ar">reference</var>] [<var class="Ar">reference ...</var>]</dt>
311 461d9094 2023-07-19 stsp <dd>Dump the contents of the repository to standard output in Git bundle
313 461d9094 2023-07-19 stsp <p class="Pp">If one or more <var class="Ar">reference</var> arguments is
314 461d9094 2023-07-19 stsp specified, only add objects which are reachable via the specified
315 461d9094 2023-07-19 stsp references. Each <var class="Ar">reference</var> argument may either
316 461d9094 2023-07-19 stsp specify a specific reference or a reference namespace, in which case all
317 461d9094 2023-07-19 stsp references within this namespace will be used.</p>
318 461d9094 2023-07-19 stsp <p class="Pp">The options for <code class="Nm">gotadmin</code>
319 461d9094 2023-07-19 stsp <code class="Cm">dump</code> are as follows:</p>
320 461d9094 2023-07-19 stsp <dl class="Bl-tag">
321 461d9094 2023-07-19 stsp <dt id="q~3"><a class="permalink" href="#q~3"><code class="Fl">-q</code></a></dt>
322 461d9094 2023-07-19 stsp <dd>Suppress progress reporting output.</dd>
323 461d9094 2023-07-19 stsp <dt id="r~4"><a class="permalink" href="#r~4"><code class="Fl">-r</code></a>
324 461d9094 2023-07-19 stsp <var class="Ar">repository-path</var></dt>
325 461d9094 2023-07-19 stsp <dd>Use the repository at the specified path. If not specified, assume the
326 461d9094 2023-07-19 stsp repository is located at or above the current working directory. If
327 461d9094 2023-07-19 stsp this directory is a <a class="Xr" aria-label="got, section
328 461d9094 2023-07-19 stsp 1">got(1)</a> work tree, use the repository path associated with this
329 461d9094 2023-07-19 stsp work tree.</dd>
330 461d9094 2023-07-19 stsp <dt id="x~2"><a class="permalink" href="#x~2"><code class="Fl">-x</code></a>
331 461d9094 2023-07-19 stsp <var class="Ar">reference</var></dt>
332 461d9094 2023-07-19 stsp <dd>Exclude objects reachable via the specified
333 461d9094 2023-07-19 stsp <var class="Ar">reference</var> from the bundle. The
334 461d9094 2023-07-19 stsp <var class="Ar">reference</var> argument may either specify a specific
335 461d9094 2023-07-19 stsp reference or a reference namespace, in which case all references
336 461d9094 2023-07-19 stsp within this namespace will be excluded. The <code class="Fl">-x</code>
337 461d9094 2023-07-19 stsp option may be specified multiple times to build a list of references
338 461d9094 2023-07-19 stsp to exclude.
339 461d9094 2023-07-19 stsp <p class="Pp">Exclusion takes precedence over inclusion. If a reference
340 461d9094 2023-07-19 stsp appears in both the included and excluded lists, it will be
341 461d9094 2023-07-19 stsp excluded.</p>
345 461d9094 2023-07-19 stsp <dt id="load"><a class="permalink" href="#load"><code class="Cm">load</code></a>
346 461d9094 2023-07-19 stsp [<code class="Fl">-nq</code>] [<code class="Fl">-l</code>
347 461d9094 2023-07-19 stsp <var class="Ar">bundle-path</var>] [<code class="Fl">-r</code>
348 461d9094 2023-07-19 stsp <var class="Ar">repository-path</var>] [<var class="Ar">reference
349 461d9094 2023-07-19 stsp ...</var>]</dt>
350 461d9094 2023-07-19 stsp <dd>Read a Git bundle stream from standard input and load its data into a
351 461d9094 2023-07-19 stsp repository.
352 461d9094 2023-07-19 stsp <p class="Pp">If one or more <var class="Ar">reference</var> arguments are
353 461d9094 2023-07-19 stsp provided then only load the specified references from the bundle.
354 461d9094 2023-07-19 stsp Otherwise, all references will be loaded.</p>
355 461d9094 2023-07-19 stsp <p class="Pp">The options for <code class="Cm">gotadmin load</code> are as
356 461d9094 2023-07-19 stsp follows:</p>
357 461d9094 2023-07-19 stsp <dl class="Bl-tag">
358 461d9094 2023-07-19 stsp <dt id="l"><a class="permalink" href="#l"><code class="Fl">-l</code></a>
359 461d9094 2023-07-19 stsp <var class="Ar">bundle-path</var></dt>
360 461d9094 2023-07-19 stsp <dd>List references available for loading from the bundle at the specified
361 461d9094 2023-07-19 stsp <var class="Ar">bundle-path</var> and exit immediately. If the
362 461d9094 2023-07-19 stsp <code class="Fl">-l</code> option is specified then no
363 461d9094 2023-07-19 stsp <var class="Ar">reference</var> arguments are allowed. The
364 461d9094 2023-07-19 stsp <code class="Fl">-l</code> option is incompatible with the
365 461d9094 2023-07-19 stsp <code class="Fl">-n</code> option.</dd>
366 461d9094 2023-07-19 stsp <dt id="n~2"><a class="permalink" href="#n~2"><code class="Fl">-n</code></a></dt>
367 461d9094 2023-07-19 stsp <dd>Attempt to load the bundle but don't install new packfile or update
368 461d9094 2023-07-19 stsp any reference. Can be used to verify the integrity of the bundle.</dd>
369 461d9094 2023-07-19 stsp <dt id="q~4"><a class="permalink" href="#q~4"><code class="Fl">-q</code></a></dt>
370 461d9094 2023-07-19 stsp <dd>Suppress progress reporting output.</dd>
371 461d9094 2023-07-19 stsp <dt id="r~5"><a class="permalink" href="#r~5"><code class="Fl">-r</code></a>
372 461d9094 2023-07-19 stsp <var class="Ar">repository-path</var></dt>
373 461d9094 2023-07-19 stsp <dd>Use the repository at the specified path. If not specified, assume the
374 461d9094 2023-07-19 stsp repository is located at or above the current working directory. If
375 461d9094 2023-07-19 stsp this directory is a <a class="Xr" aria-label="got, section
376 461d9094 2023-07-19 stsp 1">got(1)</a> work tree, use the repository path associated with this
377 461d9094 2023-07-19 stsp work tree.</dd>
382 a954aa0a 2021-06-22 stsp <section class="Sh">
383 63657f42 2022-09-07 stsp <h2 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT
384 63657f42 2022-09-07 stsp STATUS</a></h2>
385 a954aa0a 2021-06-22 stsp <p class="Pp">The <code class="Nm">gotadmin</code> utility exits 0 on
386 a954aa0a 2021-06-22 stsp success, and >0 if an error occurs.</p>
388 a954aa0a 2021-06-22 stsp <section class="Sh">
389 63657f42 2022-09-07 stsp <h2 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
390 63657f42 2022-09-07 stsp ALSO</a></h2>
391 376d4d52 2022-07-04 stsp <p class="Pp"><a class="Xr" aria-label="got, section 1">got(1)</a>,
392 376d4d52 2022-07-04 stsp <a class="Xr" aria-label="tog, section 1">tog(1)</a>,
393 376d4d52 2022-07-04 stsp <a class="Xr" aria-label="git-repository, section 5">git-repository(5)</a>,
394 376d4d52 2022-07-04 stsp <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a></p>
396 a954aa0a 2021-06-22 stsp <section class="Sh">
397 63657f42 2022-09-07 stsp <h2 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h2>
398 51683866 2022-07-14 stsp <p class="Pp"><span class="An">Christian Weisgerber</span>
399 51683866 2022-07-14 stsp <<a class="Mt" href="mailto:naddy@openbsd.org">naddy@openbsd.org</a>>
401 51683866 2022-07-14 stsp <span class="An">Josh Rickmar</span>
402 51683866 2022-07-14 stsp <<a class="Mt" href="mailto:jrick@zettaport.com">jrick@zettaport.com</a>>
404 51683866 2022-07-14 stsp <span class="An">Klemens Nanni</span>
405 51683866 2022-07-14 stsp <<a class="Mt" href="mailto:kn@openbsd.org">kn@openbsd.org</a>>
407 41ae98c9 2023-06-23 stsp <span class="An">Omar Polo</span>
408 41ae98c9 2023-06-23 stsp <<a class="Mt" href="mailto:op@openbsd.org">op@openbsd.org</a>>
410 a954aa0a 2021-06-22 stsp <span class="An">Ori Bernstein</span>
411 51683866 2022-07-14 stsp <<a class="Mt" href="mailto:ori@openbsd.org">ori@openbsd.org</a>>
413 51683866 2022-07-14 stsp <span class="An">Stefan Sperling</span>
414 51683866 2022-07-14 stsp <<a class="Mt" href="mailto:stsp@openbsd.org">stsp@openbsd.org</a>>
416 51683866 2022-07-14 stsp <span class="An">Tracey Emery</span>
417 51683866 2022-07-14 stsp <<a class="Mt" href="mailto:tracey@traceyemery.net">tracey@traceyemery.net</a>></p>
419 16cd1323 2021-07-26 stsp <section class="Sh">
420 63657f42 2022-09-07 stsp <h2 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h2>
421 16cd1323 2021-07-26 stsp <p class="Pp"><code class="Nm">gotadmin</code> is a work-in-progress and some
422 16cd1323 2021-07-26 stsp features remain to be implemented.</p>
423 376d4d52 2022-07-04 stsp <p class="Pp">At present, the user has to fall back on
424 376d4d52 2022-07-04 stsp <a class="Xr" aria-label="git, section 1">git(1)</a> to perform some tasks.
425 376d4d52 2022-07-04 stsp In particular:</p>
426 16cd1323 2021-07-26 stsp <ul class="Bl-bullet">
427 16cd1323 2021-07-26 stsp <li>Exporting data from repositories requires
428 376d4d52 2022-07-04 stsp <a class="Xr" aria-label="git-fast-export, section
429 376d4d52 2022-07-04 stsp 1">git-fast-export(1)</a>.</li>
430 16cd1323 2021-07-26 stsp <li>Importing data into repositories requires
431 376d4d52 2022-07-04 stsp <a class="Xr" aria-label="git-fast-import, section
432 376d4d52 2022-07-04 stsp 1">git-fast-import(1)</a>.</li>
435 16cd1323 2021-07-26 stsp <section class="Sh">
436 63657f42 2022-09-07 stsp <h2 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h2>
437 16cd1323 2021-07-26 stsp <p class="Pp">Disk space savings reported by <code class="Cm">gotadmin
438 16cd1323 2021-07-26 stsp cleanup</code> will be misleading if the repository contains object files
439 16cd1323 2021-07-26 stsp that were hard-linked from another repository. Such hard-links will be
440 376d4d52 2022-07-04 stsp created by certain <a class="Xr" aria-label="git, section 1">git(1)</a>
441 376d4d52 2022-07-04 stsp commands. By itself, <a class="Xr" aria-label="got, section 1">got(1)</a>
442 376d4d52 2022-07-04 stsp will never create hard-linked object files.</p>
445 63657f42 2022-09-07 stsp <div class="foot" role="doc-pagefooter" aria-label="Manual footer
446 765eba91 2024-11-21 op line"><span class="foot-left"></span><span class="foot-date">November 21,
447 a3016eec 2024-10-22 op 2024</span> <span class="foot-os">OpenBSD 7.6</span></div>