Skip to content

get

get(_, refRange): Promise<string | null>

Defined in: review/src/sources/gitDiffSource.ts:20

Gets a local diff via git --no-pager diff [refRange] — review the working tree (or a ref range) without GitHub and without piping a diff through stdin.

ProviderConfig | null

config (unused in this source)

string | undefined

optional revision selection passed to git diff, e.g. origin/main...HEAD or HEAD~3. When omitted, diffs the working tree against the index (plain git diff).

Promise<string | null>

the diff content; throws with a clear message outside a git repository, on a bad ref, or when the diff is empty (an empty review would otherwise run against no content).