defaultBranchOffunctionno test imports itfunction defaultBranchOf(lsRemote: string): stringThe branch a git ls-remote --symref <url> HEAD says HEAD points to: empty where it says none (an empty repository).
Plain Git behind the one interface (commons 0001-githost FR-001 to FR-003): any Git remote that is not GitHub or GitLab, read by running git. It answers the four common capabilities (the clone URL, credentials, the default branch and whether a commit's signature verifies) and returns unsupported for the rest: protected branches, issues and change requests are what a host adds, and plain Git has none.
A remote is asked with git ls-remote --symref, so its own credential helper authenticates and no terminal prompt is ever shown (GIT_TERMINAL_PROMPT=0); this adapter holds no credential and writes none. A signature is read from a clone that the caller names (localOf), by git log --format=%G?, with the user's own Git configuration (the key's allowedSignersFile for an SSH signature, the keyring for an OpenPGP one): the commit is verified where Git says G.
defaultBranchOffunctionno test imports itfunction defaultBranchOf(lsRemote: string): stringThe branch a git ls-remote --symref <url> HEAD says HEAD points to: empty where it says none (an empty repository).
plainGitClientfunctionfunction plainGitClient(options?: PlainGitOptions): GitHostClientA plain Git client: the common four capabilities, and unsupported for protected branches, issues and change requests.
PlainGitOptionstypeno test imports ittype PlainGitOptions = {
/** The program (`git` on the path by default). */
readonly program?: string;
/** The URL… (671 characters)type PlainGitOptions = {
/** The program (`git` on the path by default). */
readonly program?: string;
/** The URL or path a repository is asked from; its HTTPS clone URL by default. Never one with a credential in it. */
readonly remoteOf?: (ref: RepoRef) => string;
/** A clone of the repository on this computer, where the signature of a commit can be read; none by default (a signature is then `not-found`). */
readonly localOf?: (ref: RepoRef) => string | undefined;
/** Variables added to `git`'s environment (a test points `GIT_CONFIG_GLOBAL` at its own file; nothing here may be a credential). */
readonly env?: Readonly<Record<string, string>>;
};How a plain Git client is made.