INNER CODE UNIT · TypeScript

gitEndpointCacheKey

modem-dev/hunk · packages/hunk-git/src/index.ts:148

function gitEndpointCacheKey(endpoint: GitDiffEndpoints["old"], indexCacheKey: string) {
  if (endpoint.kind === "git-ref") {
    return `ref:${endpoint.ref}`;
  }
  if (endpoint.kind === "index") {
    return `index:${indexCacheKey}`;
  }
  return endpoint.kind;
}

/** Build a pinned revision source capability without blocking renderer input. */
async function createGitRevisionSourceCapabilityAsync(
  input: GitBackedInput,
  ref: string,
  repoRoot: string,
  gitExecutable: string,
  signal?: AbortSignal,
): Promise<GitRevisionSourceCapability> {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…