INNER CODE UNIT · TypeScript

createGitRevisionSourceCapabilityAsync

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

async function createGitRevisionSourceCapabilityAsync(
  input: GitBackedInput,
  ref: string,
  repoRoot: string,
  gitExecutable: string,
  signal?: AbortSignal,
): Promise<GitRevisionSourceCapability> {
  const newRef = await resolveGitCommitRefAsync(input, ref, {
    cwd: repoRoot,
    gitExecutable,
    signal,
  });
  return {
    ...(await createGitSourceCapabilityAsync(
      input,
      repoRoot,
      { old: { kind: "git-ref", ref: `${newRef}^` }, new: { kind: "git-ref", ref: newRef } },
      gitExecutable,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…