logical.MERGE_LOGconstno test imports itconst MERGE_LOG: readonly string[]The git log arguments that give one line for each merge: the hash, the author's name and address and the committer's name and address, separated by tabs.
The identity of the merge commits of a history (commons repoctl 0007-repoctl-hygiene FR-007): a merge made by a git pull where no user.name and user.email were set takes the identity of the machine or the session, and the history then credits another name. The check is pure: it reads the merges as data (git log --merges gives one line for each) and the identity and the held list of the configuration, and gives the findings; history is never rewritten, so a merge that was made wrongly is held by its hash and the held list only shrinks (a held hash that matches no merge is a warning).
import { identityFindings, parseMerges } from "./history.ts";
identityFindings(parseMerges(""), { name: "A B", email: "a@example.test" }, []); // []logical.MERGE_LOGconstno test imports itconst MERGE_LOG: readonly string[]The git log arguments that give one line for each merge: the hash, the author's name and address and the committer's name and address, separated by tabs.
logical.MergeFacttypeno test imports ittype MergeFact = { readonly hash: string; readonly author: Identity; readonly committer: Identity };One merge commit of the history, as git log says it.
logical.parseMergesfunctionno test imports itfunction parseMerges(output: string): readonly MergeFact[]The merges of the output of MERGE_LOG; a line that is not five fields is left out.
logical.identityFindingsfunctionno test imports itfunction identityFindings(merges: readonly MergeFact[], identity: Identity, held: readonly string[]): readonly HygieneFinding[]The findings of the merges against the identity: one for each merge not made by it and not held, and a warning for each held hash that matches no merge.
MERGE_LOGconstno test imports itconst MERGE_LOG: readonly string[]The git log arguments that give one line for each merge: the hash, the author's name and address and the committer's name and address, separated by tabs.
MergeFacttypeno test imports ittype MergeFact = { readonly hash: string; readonly author: Identity; readonly committer: Identity };One merge commit of the history, as git log says it.
parseMergesfunctionno test imports itfunction parseMerges(output: string): readonly MergeFact[]The merges of the output of MERGE_LOG; a line that is not five fields is left out.
identityFindingsfunctionno test imports itfunction identityFindings(merges: readonly MergeFact[], identity: Identity, held: readonly string[]): readonly HygieneFinding[]The findings of the merges against the identity: one for each merge not made by it and not held, and a warning for each held hash that matches no merge.