SwarmOps
ReferenceCommandsswarmops ref log

Page kind: Reference

swarmops ref log#

Describes v0.11.0Last changed View as Markdown

List ref NAME's moves, newest first: the op log filtered to the ref.

A deleted ref lists its moves, the newest with no new value. A name the journal records no move of is E_REF_NOT_FOUND; finding that reads the whole journal.

Metadata
Group
refs
Since
0.11.0
Mutates
no
Identity required
no
MCP tool
ref_log
Envelope op
ref_log
Exit codes
06

Syntax#

Syntax
swarmops ref log [OPTIONS] <NAME>

Required arguments#

Syntax: <NAME>.

The ref.

Optional arguments#

The command also takes the global options.

Syntax: --before <OP>.

List the moves of operations numbered below OP: the last op of a page reads on from there.

Syntax: -n, --limit <N>. Default: 50.

The most moves to list.

Examples#

Shell
swarmops --repo [tmp]/store --as agent/worker-17 ref log release/never
Output, an error
{ "ok": false, "op": "ref_log", "api": 1, "error": { "code": "E_REF_NOT_FOUND", "message": "ref \"release/never\" never existed: the journal records no move of it", "retryable": false,
Show 13 more lines "exit": 6, "details": { "name": "release/never" }, "hint": "swarmops ref list names the refs" }, "meta": { "repo": "[tmp]/store", "elapsed_ms": "[elapsed_ms]", "resolved": {}, "auth": "trust" } }

Exit code 6. Recorded by the CLI tests. A name in square brackets, such as [tmp] or [c1], stands for what differs from run to run: the test's temporary directory, an id, a time.

No recorded example yet.

Return information#

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

FieldTypeRequiredDescription
movesarray of RefLogEntryOutyesIts moves.
namestringyesThe ref.
truncatedbooleanyesWhether older moves follow this page: give the last one's op as before to read them.

Envelope op: ref_log.

Exit codes:

  • 0: Success.
  • 6: Something the request names does not exist.

Errors#

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