MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getStrongestMetadata

Function getStrongestMetadata

out/cli.cjs:50791–50808  ·  view source on GitHub ↗
(metadataList)

Source from the content-addressed store, hash-verified

50789 result.push(parsedToken.groups);
50790 }
50791 }
50792 if (empty === true) {
50793 return "no metadata";
50794 }
50795 return result;
50796 }
50797 function getStrongestMetadata(metadataList) {
50798 let algorithm = metadataList[0].algo;
50799 if (algorithm[3] === "5") {
50800 return algorithm;
50801 }
50802 for (let i3 = 1; i3 < metadataList.length; ++i3) {
50803 const metadata = metadataList[i3];
50804 if (metadata.algo[3] === "5") {
50805 algorithm = "sha512";
50806 break;
50807 } else if (algorithm[3] === "3") {
50808 continue;
50809 } else if (metadata.algo[3] === "3") {
50810 algorithm = "sha384";
50811 }

Callers 1

bytesMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…