MCPcopy Create free account
hub / github.com/SethGammon/Citadel / defaultIsAncestor

Function defaultIsAncestor

scripts/stack-plan.js:109–120  ·  view source on GitHub ↗
(projectRoot, ancestor, descendant)

Source from the content-addressed store, hash-verified

107}
108
109function defaultIsAncestor(projectRoot, ancestor, descendant) {
110 if (!ancestor || !descendant || ancestor === descendant) return false;
111 try {
112 childProcess.execFileSync('git', ['merge-base', '--is-ancestor', ancestor, descendant], {
113 cwd: projectRoot,
114 stdio: 'ignore',
115 });
116 return true;
117 } catch {
118 return false;
119 }
120}
121
122function resolveGitRef(projectRoot, ref) {
123 if (!ref) return null;

Callers 1

orderReportsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected