MCPcopy Create free account
hub / github.com/backnotprop/plannotator / resolveInitialBase

Function resolveInitialBase

packages/shared/vcs-core.ts:390–403  ·  view source on GitHub ↗
(
    gitContext: GitContext,
    diffType: DiffType,
    requestedBase: string | undefined,
    ownsRequestedDiffType: boolean,
  )

Source from the content-addressed store, hash-verified

388 }
389
390 function resolveInitialBase(
391 gitContext: GitContext,
392 diffType: DiffType,
393 requestedBase: string | undefined,
394 ownsRequestedDiffType: boolean,
395 ): string {
396 if (gitContext.vcsType === "jj") {
397 if (diffType === "jj-line" && ownsRequestedDiffType && requestedBase) {
398 return requestedBase;
399 }
400 return gitContext.defaultBranch;
401 }
402 return requestedBase ?? gitContext.defaultBranch;
403 }
404
405 return {
406 detectVcs,

Callers 1

prepareLocalReviewDiffFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected