MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / detectDefaultBranch

Function detectDefaultBranch

docs/scripts/generate-docs.ts:57–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57function detectDefaultBranch() {
58 try {
59 const ref = run("git symbolic-ref refs/remotes/origin/HEAD");
60 const parts = ref.split("/");
61 return parts[parts.length - 1];
62 } catch {
63 throw new Error("Cannot detect default branch from origin/HEAD");
64 }
65}
66
67
68function hasLocalRef(ref: string) {

Callers 1

generate-docs.tsFile · 0.85

Calls 1

runFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…