IF Commons GitHub

physical/git

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-git-layers FR-002

The one place the library runs Git: every call is git with the repository named by its Git folder, the configuration of a computer that would change what a command does turned off (no signing, no hooks, no prompt, no pager), and the text of Git's messages in the language Git writes by default. A call that cannot start is a failed call, never a throw.

Source: commons/anyfs-git/src/physical/git.ts

0 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

failurefunctionno test imports it
function failure(out: Output): string

A call that did not end with 0, as one sentence: the last lines Git wrote, or its status.

Gittypeno test imports it
type Git = {
  /** The Git folder, absolute: the repository itself for a bare one, `.git` for a working tree. */
  readonly gitDir: string;
  readonly bare: boolean;
  /** The folder of the working tree, where there is one. */
  readonly workTree?: string;
  /** Runs `git <args>` and keeps its output as bytes. */
  run(args: readonly string[], call?: Call): Promise<proc.Output>;
};

A repository to run Git on.

openGitfunctionno test imports it
function openGit(repo: string, program?: string): Promise<Result<Git, string>>

The repository at a folder, or why Git cannot work there. The folder is the working tree, the Git folder or a bare repository.

Titles, headings, exports, tables, columns and requirements. Esc closes.