Expand description
The read-oriented container Git backend (0037 DC1b): the same
bounded git queries as the remote backend, executed inside a
running container through the local engine’s docker exec
(GitExec::Container) and parsed by the same wire parsers —
discovery and context are the exec-generic cores shared with
crate::remote, so no parsing or exit-code mapping is duplicated
here. Like the remote path, no mutation verbs exist: container
repositories are read-only.
The returned workdir is a path inside the container — never a local path, and no libgit2 handle may be opened against it. The container boundary carries argv as UTF-8 text and caps retained output; both surface as typed refusals from the exec layer, and a truncated stream can never pose as a complete record set.
Functions§
- context
- The pure cached context of an in-container repository: HEAD sha,
branch and remotes captured once on a worker, the same
GitContextthe local and remote paths produce — withRepoTarget::Containeras the repo identity. Unborn HEAD and detached HEAD are honestNone/name states, distinguished by exit code — never by stderr text. - discover
- Discover the repository containing an in-container directory.
Ok(None)is the honest “no repository here” — git’s own not-a-repository fatal — while engine failures, missinggitand corrupt repositories are typed errors. The returned workdir is a path inside the container, never a local path.