INNER CODE UNIT · TypeScript
createJjReviewInfo
modem-dev/hunk · packages/hunk-jj/src/index.ts:128
async function createJjReviewInfo(
input: ExtensionVcsDiffInput,
endpoints: JjDiffEndpoints | undefined,
repoRoot: string,
jjExecutable: string,
signal?: AbortSignal,
) {
if (!endpoints) return undefined;
if (input.rangeEndpoints && endpoints.oldCommitIds.length === 1) {
const base = endpoints.oldCommitIds[0]!;
const head = endpoints.newCommitId;
const revset = `${base}..${head}`;
const [commits, commitCount] = await Promise.all([
loadJjReviewCommits(revset, { cwd: repoRoot, jjExecutable, signal }),
countJjReviewCommits(revset, { cwd: repoRoot, jjExecutable, signal }),
]);
return comparisonReviewInfo("Jujutsu", base, head, commits, commitCount);
}