SwarmOps
ReferenceCommandsswarmops ws diff

Page kind: Reference

swarmops ws diff#

Describes v0.11.0Last changed View as Markdown

A workspace's edits against its head, as diff gives a diff.

Metadata
Group
workspaces
Since
0.3.0
Mutates
no
Identity required
no
MCP tool
ws_diff
Envelope op
ws_diff
Exit codes
0
Errors
none

Syntax#

Syntax
swarmops ws diff [OPTIONS] [PATH]...

Required arguments#

None.

Optional arguments#

The command also takes the global options.

Syntax: --ws <NAME>.

The workspace, by its name in the store's registry (default: the one around the working directory).

Syntax: --ws-path <DIR>.

The workspace's directory.

Syntax: <PATH>.

Only these repository paths, and what is below them.

Syntax: --format <FORMAT>. Default: names.

What to say of each file. Values: names: Its path and status; stat: Also whether it is binary and, for text, the lines it inserts and deletes; unified: Also its kinds, its blobs and, for text, its hunks.

Syntax: --context <N>. Default: 3.

The unchanged lines around each change in a unified hunk.

Syntax: --limit <N>. Default: 500.

The most files to print.

Syntax: --cursor <C>.

Where the previous page stopped.

Syntax: --max-bytes <N>. Default: 32768.

The most bytes of unified text.

Examples#

No recorded example yet.

No recorded example yet.

Return information#

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

FieldTypeRequiredDescription
cursorstring or nullnoWhen truncated: where the next page starts. Opaque: pass it back as given, as the next request's cursor.
filesarray of FileDiffyesThe files.
fromstringyesThe changeset from named.
tostringyesThe changeset to named.
truncatedbooleanyesWhether more files follow this page.

Envelope op: ws_diff.

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