SwarmOps
ReferenceCommandsswarmops fetch

Page kind: Reference

swarmops fetch#

Describes v0.11.0Last changed View as Markdown

Fetch a git remote into the store's mirror, and its followed branch into the store.

Git 2.39 or later fetches the remote's branches and tags into the store's mirror; the followed branch's commits become changesets, with no ref moved: main never moves. Run again with nothing new on the remote, it imports nothing. It needs no identity.

Metadata
Group
remotes
Since
0.2.0
Mutates
yes
Identity required
no
MCP tool
fetch
Envelope op
fetch
Exit codes
0
Errors
none

Syntax#

Syntax
swarmops fetch [OPTIONS] <REMOTE>

Required arguments#

Syntax: <REMOTE>.

The remote, by its name.

Optional arguments#

The command also takes the global options.

Examples#

No recorded example yet.

No recorded example yet.

Return information#

result is a FetchResp (swarmops schema FetchResp prints its JSON Schema).

FieldTypeRequiredDescription
branchstringyesThe followed branch.
branchesarray of BranchUpdateyesThe remote branches that moved, appeared or went, at most 1,000.
branches_truncatedbooleanyesWhether more branches moved than branches lists.
headRemoteHead or nullnoThe followed branch's head after the fetch; omitted when the remote has no such branch.
importedintegeryesHow many changesets the import of the followed branch added.
old_headRemoteHead or nullnoThe followed branch's head as the last fetch saw it; omitted when none did.
remotestringyesThe remote, by its name.
tags_fetchedintegeryesHow many tags the fetch brought into the mirror (they are never imported).
warningsarray of string or nullnoWhat the fetch has to say that did not stop it. Omitted when there is nothing.

Envelope op: fetch.

Exit codes:

  • 0: Success.

Errors#

No golden step shows this command failing yet.

Any command that opens a store may also fail with a store error, such as E_NOT_A_REPO, E_IO or E_STORE_CORRUPT; a command line the grammar refuses is E_INVALID_ARG (exit 2).

See also#

On this page