# swarmops land-check

> Release: 0.11.0 · Last changed: 2026-11-09 · Source: https://github.com/KeiaiLab/SwarmOps/blob/stable/docs/reference/commands/land-check.md

Say what landing changes in order onto a ref would come to, writing nothing.

Each HEAD, with its first-parent chain since its merge base with the ref's head, is merged onto what the clean ones before it make, as land would land them one after another: clean, with the root tree its landed changeset would have and the paths it changes; replayed; nothing\_to\_land; or conflict, with the report land gives in E\_CONFLICT. It takes no lock and writes nothing, and exits 0 whatever the outcomes. A HEAD not found, or a merge in a chain, fails the whole check as it fails a land.

```yaml
title: "swarmops land-check"
description: "Say what landing changes in order onto a ref would come to, writing nothing."
group: "write"
since: "0.11.0"
mutates: false
identity_required: false
mcp_tool: "land_check"
envelope_op: "land_check"
exit_codes: [0, 1, 2]
errors: [E_TOO_LARGE, E_INVALID_ARG]
syntax: "swarmops land-check [OPTIONS] <HEAD>..."
```

## Syntax

```text
swarmops land-check [OPTIONS] <HEAD>...
```

## Required arguments

### `HEAD`

Syntax: `<HEAD>`.

The changes' heads, in the order they would land: 1 to 32.

## Optional arguments

The command also takes the [global options](../cli.md#global-options).

### `--onto`

Syntax: `--onto <REF>`.
Default: `main`.

The ref they would land on: main or a release ref (release/NAME).

### `--max-conflict-bytes`

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

The most bytes of hunk text each conflicting change's report carries, as land's.

## Examples

### CLI

```sh
swarmops --repo [tmp]/store land-check [first] [second] [third]
```

```json
{
  "ok": true,
  "op": "land_check",
  "api": 1,
  "result": {
    "onto": "[t0]",
    "items": [
      {
        "head": "[first]",
        "outcome": "clean",
        "root": "[first_root]",
        "paths": [
          {
            "path": "f.txt",
            "change": "modified"
          }
        ]
      },
      {
        "head": "[second]",
        "outcome": "clean",
        "root": "[second_root]",
        "paths": [
          {
            "path": "g.txt",
            "change": "added"
          }
        ]
      },
      {
        "head": "[third]",
        "outcome": "conflict",
        "report": {
          "base": "[t0]",
          "ours": "[third]",
          "theirs": "[t0]",
          "files": [
            {
              "path": "f.txt",
              "kind": "content",
              "base_blob": "[id4]",
              "ours_blob": "[id5]",
              "theirs_blob": "[id6]",
              "hunks": [
                {
                  "id": 0,
                  "base": {
                    "first": 2,
                    "last": 2,
                    "text": "2\n"
                  },
                  "ours": {
                    "first": 2,
                    "last": 2,
                    "text": "C\n"
                  },
                  "theirs": {
                    "first": 2,
                    "last": 2,
                    "text": "A\n"
                  }
                }
              ]
            }
          ],
          "kinds": [
            "content"
          ],
          "truncated": false
        }
      }
    ]
  },
  "meta": {
    "repo": "[tmp]/store",
    "elapsed_ms": "[elapsed_ms]",
    "resolved": {
      "[first]": "[first]",
      "[second]": "[second]",
      "[third]": "[third]",
      "main": "[t0]"
    },
    "auth": "trust"
  }
}
```

Exit code 0. 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.

### MCP

No recorded example yet.

## Return information

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `array of LandCheckItemOut` | yes | Each change's outcome, in the request's order. |
| `onto` | `string` | yes | The target's head the changes were planned on: a land with `expect_target` set to it lands what the check found, or nothing. |

Envelope `op`: `land_check`.

Exit codes:

- `0`: Success.
- `1`: The operation failed.
- `2`: The request or the command line is malformed.

## Errors

- [`E_TOO_LARGE`](../errors.md#e_too_large) (exit 1): The content is larger than the operation allows.
- [`E_INVALID_ARG`](../errors.md#e_invalid_arg) (exit 2): A malformed argument or request, including a command-line usage error.

Any command that opens a store may also fail with a store error, such as [`E_NOT_A_REPO`](../errors.md#e_not_a_repo), [`E_IO`](../errors.md#e_io) or [`E_STORE_CORRUPT`](../errors.md#e_store_corrupt); a command line the grammar refuses is [`E_INVALID_ARG`](../errors.md#e_invalid_arg) (exit 2).

## See also

- [`swarmops commit`](commit.md)
- [`swarmops land`](land.md)
- [`swarmops land-group`](land-group.md)
- [`swarmops rebase`](rebase.md)
- [`swarmops revert`](revert.md)
- [`swarmops blob put`](blob-put.md)
- [`swarmops blob has`](blob-has.md)
- [CLI reference](../cli.md)
- [Error codes](../errors.md)
