Skip to main content

resolve_conclusion_kind

Function resolve_conclusion_kind 

Source
pub fn resolve_conclusion_kind(
    context: &GitContext,
    cwd: &Path,
    amend: bool,
    ref_files: &RefFilesLayout<'_>,
) -> Result<Conclusion, GitFailure>
Expand description

What: Resolves the commit kind from the amend flag and the owning worktree’s conclusion state. Why: An amend always wins; otherwise the first present marker in the incumbent’s order decides. A marker whose every lookup place is empty on the files backend is absent without asking Git; any entry in any place, of any content, is resolved by rev-parse --verify, so a marker naming a missing object stays a conclusion.

In TS you’d write (pseudocode):

await resolveConclusionKind({ gitPath, cwd, amend });