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

Function resolveDefaultDiffType

packages/shared/config.ts:227–231  ·  view source on GitHub ↗
(cfg?: PlannotatorConfig)

Source from the content-addressed store, hash-verified

225 * Read the user's preferred default diff type from config, falling back to 'unstaged'.
226 */
227export function resolveDefaultDiffType(cfg?: PlannotatorConfig): DefaultDiffType {
228 const v = cfg?.diffOptions?.defaultDiffType as string | undefined;
229 if (v === 'branch') return 'merge-base';
230 return v === 'uncommitted' || v === 'unstaged' || v === 'staged' || v === 'merge-base' || v === 'all' ? v : 'unstaged';
231}
232
233/**
234 * Resolve whether to use Glimpse native window.

Callers 3

handleReviewCommandFunction · 0.90
index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected