MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / getGitVersion

Function getGitVersion

packages/cli/src/utils/git.ts:39–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37};
38
39const getGitVersion = () => {
40 const stdout = execSync("git --version").toString().trim();
41 const gitVersionTag = stdout.split(" ")[2];
42 const major = gitVersionTag?.split(".")[0];
43 const minor = gitVersionTag?.split(".")[1];
44 return { major: Number(major), minor: Number(minor) };
45};
46
47/** @returns The git config value of "init.defaultBranch". If it is not set, returns "main". */
48const getDefaultBranch = () => {

Callers 1

initializeGitFunction · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…