MCPcopy
hub / github.com/webpack/webpack / getHead

Function getHead

test/BenchmarkTestCases.benchmark.mjs:64–76  ·  view source on GitHub ↗

* @param {[string, string, string, string | undefined]} revList rev list * @returns {Promise<string>} head

(revList)

Source from the content-addressed store, hash-verified

62 * @returns {Promise<string>} head
63 */
64async function getHead(revList) {
65 if (typeof process.env.HEAD !== "undefined") {
66 return process.env.HEAD;
67 }
68
69 // On CI we take the latest commit `merge commit` as a head
70 if (revList[3]) {
71 return revList[3];
72 }
73
74 // Otherwise we take the latest commit
75 return revList[1];
76}
77
78/**
79 * @param {string} head head

Callers 1

getBaselineRevsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected