# `WardrikACP.Checkout`

A git repository coding agents work in.

    checkouts: [
      billing: "/srv/billing",
      core: [path: "~/src/core", base: "origin/main", fetch: true]
    ]

  * A path alone is `[path: path]`.
  * The repository needs at least one commit.
  * With `base: "origin/main"` and `fetch: true`, new work starts from the remote's latest
    `main`, whatever branch the checkout is on.

## Options

* `:path` (`t:String.t/0`) - Required. The repository's directory.

* `:base` (`t:String.t/0`) - The ref new branches start from, and the sweep compares with. The default value is `"HEAD"`.

* `:fetch` (`t:boolean/0`) - `true` to run `git fetch` before a new branch starts and before each sweep. The default value is `false`.

# `t`

```elixir
@type t() :: %WardrikACP.Checkout{
  base: String.t(),
  fetch: boolean(),
  name: String.t(),
  path: Path.t()
}
```

# `new!`

```elixir
@spec new!(atom() | String.t(), String.t() | keyword()) :: t()
```

Builds the checkout `name` from a path or options. Raises if an option is invalid.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
