|GOTADMIN(1)||General Commands Manual||GOTADMIN(1)|
gotadmin — Game of
Trees repository administration
gotadmin is the repository maintenance
tool for the got(1) version control system.
got(1) stores the history of tracked files in a
Git repository, as used by the Git version control system.
gotadmin provides commands for inspecting and
manipulating the on-disk state of Git repositories. The repository format is
described in git-repository(5).
gotadmin provides global and
command-specific options. Global options must precede the command name, and
are as follows:
The commands for
gotadmin are as
The options for
gotadmin info are as
-xreference] [reference ...]
If one or more reference arguments is specified, only add objects which are reachable via the specified references. Each reference argument may either specify a specific reference or a reference namespace, in which case all references within this namespace will be used.
gotadmin pack always ignores
references in the refs/got/ namespace,
effectively treating such references as if they did not refer to any
The options for
gotadmin pack are as
-xoption may be specified multiple times to build a list of references to exclude.
Exclusion takes precedence over inclusion. If a reference appears in both the included and excluded lists, it will be excluded.
A pack index is required for using the corresponding pack file
with got(1). Usually, a pack index will be created by
commands such as
gotadmin pack or
got fetch as part of regular operation. The
gotadmin indexpack command may be used to
recover from a corrupt or missing index. A given pack file will always
yield the same bit-identical index.
The provided packfile-path must be located within the objects/pack/ directory of the repository and should end in .pack. The filename of the corresponding pack index is equivalent, except that it ends in .idx.
Each object contained in the pack file will be displayed on a single line. The information shown includes the object ID, object type, object offset, and object size.
If a packed object is deltified against another object the delta base will be shown as well. For offset deltas, the delta base is identified via an offset into the pack file. For reference deltas, the delta base is identified via an object ID.
The provided packfile-path must be located within the objects/pack/ directory of the repository and should end in .pack.
The options for
gotadmin listpack are
Unreferenced objects are present in the repository but cannot be reached via any reference in the entire refs/ namespace.
Loose objects are stored as individual files beneath the repository's objects/ directory, spread across 256 sub-directories named after the 256 possible hexadecimal values of the first byte of an object identifier.
Packed objects stored in pack files under objects/pack/ will not be purged. However, if redundant copies of packed objects exist in loose form, such redundant copies will be purged.
Objects will usually become unreferenced as a result of
deleting branches or tags with
got branch -d or
got tag -d. Deleting arbitrary references with
got ref -d may also leave unreferenced objects
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.
References in the refs/got namespace
may prevent objects from being purged. This includes references in the
refs/got/worktree namespace created by
got checkout and
update, as well as references in the
refs/got/backup namespace created by
got rebase and
gotadmin cleanup will only
purge corresponding objects once such references have been deleted with
got ref -d.
Some Git repositories contain pack index files which lack a
corresponding pack file, which is an inconsistent repository state. In
gotadmin cleanup -p -n 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
gotadmin cleanup -p.
The “preciousObjects” Git extension is intended
to prevent the removal of objects from a repository.
gotadmin cleanup will refuse to operate on
repositories where this extension is active.
The options for
gotadmin cleanup are
gotadmin utility exits 0 on
success, and >0 if an error occurs.
gotadmin is a work-in-progress and some
features remain to be implemented.
At present, the user has to fall back on git(1) to perform some tasks. In particular:
Disk space savings reported by
cleanup will be misleading if the repository contains object files
that were hard-linked from another repository. Such hard-links will be
created by certain git(1) commands. By itself,
got(1) will never create hard-linked object files.
|July 26, 2021||OpenBSD 6.9|