claude-code / mods /diff /hooks /git /tiers /fetch-context-of /fetch-context-of.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
00080b0 verified
Raw History Blame Contribute Delete
639 Bytes
import Limits from '../../../limits'
import Probes from '../../probes'
import type Types from '../../types'
/**
* The context every tier of a fetch shares: the host's pinned git, the
* repository, the mode, and one stamp probe over the working tree's top.
*
* @param deps the host
* @param mode the comparison asked for
* @returns the context
*/
export const fetchContextOf = (
deps: Types.GitDeps,
mode: Types.BaseMode,
): Types.FetchContext => ({
deps,
run: deps.run,
repository: deps.repository,
mode,
stamps: Probes.stampProbeOf(
deps,
deps.repository.toplevel,
Limits.MAX_LISTED_DIRECTORIES,
),
})