Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
639 B
Raw Blame
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,
  ),
})