MCPcopy Create free account
hub / github.com/anthropics/claude-code / fetchDiff

Function fetchDiff

mods/diff/hooks/git/fetch-diff.ts:16–33  ·  view source on GitHub ↗
(
  deps: Types.GitDeps,
  mode: Types.BaseMode,
)

Source from the content-addressed store, hash-verified

14 * @returns the outcome
15 */
16export async function fetchDiff(
17 deps: Types.GitDeps,
18 mode: Types.BaseMode,
19): Promise<Types.FetchOutcome> {
20 const isBusy = await Probes.isTransient(
21 deps.entryKindsOf,
22 deps.repository.gitDir,
23 )
24
25 if (isBusy) {
26 return { kind: 'unavailable' }
27 }
28
29 const context = Tiers.fetchContextOf(deps, mode)
30 const isBranch = mode === 'branch'
31
32 return isBranch ? Tiers.branchTier(context) : Tiers.workingTreeTier(context)
33}

Callers 1

gitBackendOfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected