IF Commons GitHub

physical/git

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-change-control-git FR-001, 0003-change-control-git FR-002

The commits of a range, read with Git's own commands and its own verification of signatures (gpg.format=ssh with the allowed_signers of the fleet), and nothing changed: only log, rev-parse and merge-base are run, the revisions are checked before they are handed to Git, and the signers' file is written to a folder of its own and removed.

import { readCommits } from "./git.ts";
// const commits = await readCommits(repo, "origin/main", "HEAD", allowedSignersText);

Source: commons/change-control/src/physical/git.ts

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

physical.readCommitsfunctionno test imports it
function readCommits(repo: string, from: string, to: string, allowedSignersText: string): Promise<Result<readonly Commit[], string>>

The commits after from up to to (all of them up to to where from is empty), oldest first, merges left out (their parents are judged), each with the paths it changed and the state of its signature against the signers' text.

physical.resolvefunctionno test imports it
function resolve(repo: string, rev: string): Promise<Result<string, string>>

The commit a revision names, or why none.

readCommitsfunction
function readCommits(repo: string, from: string, to: string, allowedSignersText: string): Promise<Result<readonly Commit[], string>>

The commits after from up to to (all of them up to to where from is empty), oldest first, merges left out (their parents are judged), each with the paths it changed and the state of its signature against the signers' text.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

resolvefunctionno test imports it
function resolve(repo: string, rev: string): Promise<Result<string, string>>

The commit a revision names, or why none.

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