Skip to main content

read_landed_commit

Function read_landed_commit 

Source
pub fn read_landed_commit(
    context: &GitContext,
    cwd: &Path,
    sha: &str,
    subject: &str,
    code_files: &[String],
) -> Result<LandedCommit, String>
Expand description

What: Read the patch and the excerpted files’ new-side texts of a landed commit. code_files are the code names in name order; only the first MAX_EXCERPT_FILES are fetched. Why: It is the whole of the review’s Git use: two starts.

In TS you’d write (pseudocode):

const commit = await readLandedCommit({ context, cwd, sha, subject, codeFiles });