# `DialectoInContext.GitContext`
[🔗](https://github.com/dialecto-eu/dialecto-phoenix/blob/v0.1.0/lib/dialecto_in_context/git_context.ex#L1)

The site's context for the sidebar (spec-0016 §4, served at
`/__dialecto/context`): `{repo, project, branch, sha, dirty, addon}`, read
from git on demand so switching branches needs no restart. A git failure
only leaves its field empty.

# `parse_github_remote`

```elixir
@spec parse_github_remote(String.t() | nil) :: String.t() | nil
```

`owner/name` from a GitHub remote URL in any of its common spellings, else nil.

# `parse_porcelain_z`

```elixir
@spec parse_porcelain_z(String.t() | nil) :: [String.t()]
```

Repo-root-relative paths (sorted, unique, capped) from `git status --porcelain=v1 -z`.

# `read`

```elixir
@spec read(map(), String.t()) :: map()
```

The context for `settings` (see `DialectoInContext.Config`), run in `root`.

---

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