Skip to main content

read_commit

Function read_commit 

Source
pub fn read_commit(common_dir: &Path, built: &str) -> Option<BuiltCommit>
Expand description

What: The parents of the commit built; None when Git is to say (the object is not a plain commit, or the repository’s history is rewritten by grafts, a shallow file or replacement objects). Why: git rev-list --parents --max-count=1 <commit> prints the commit and these parents.

In TS you’d write (pseudocode):

readCommit(commonDir, built)?.parents