MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / normalizeCommitPin

Function normalizeCommitPin

scripts/check-native-vendor-integrity.mjs:37–48  ·  view source on GitHub ↗
(rawPin)

Source from the content-addressed store, hash-verified

35}
36
37function normalizeCommitPin(rawPin) {
38 const lines = rawPin
39 .split(/\r?\n/)
40 .map((line) => line.trim())
41 .filter(Boolean);
42 if (lines.length !== 1 || !isHex40(lines[0])) {
43 throw new Error(
44 "packages/native/vendor/VENDOR_COMMIT.txt must contain exactly one 40-hex commit hash",
45 );
46 }
47 return lines[0].toLowerCase();
48}
49
50function readGitlinkCommit(rootDir) {
51 const commit = runGit(rootDir, ["rev-parse", "HEAD:vendor/zireael"]).toLowerCase();

Callers 1

Calls 1

isHex40Function · 0.85

Tested by

no test coverage detected