pub struct CommitOutcome {
pub oid: ObjectId,
pub branch: Option<String>,
pub parent: Option<ObjectId>,
pub parents: Vec<ObjectId>,
pub author: CommitAuthorInfo,
pub hooks_run: Vec<HookName>,
pub changes: usize,
pub change_id: Option<ChangeId>,
pub files: Vec<CommitFile>,
}Expand description
Result of create_commit.
Fields§
§oid: ObjectIdOID of the new commit object written to the object database.
branch: Option<String>Short name of the branch the commit advanced (e.g. main), or None when HEAD is
detached and only HEAD moved.
parent: Option<ObjectId>Parent commit OID, or None for the root commit on an unborn branch.
parents: Vec<ObjectId>Every parent OID stored in the new commit object (empty only before the first commit is written).
Author recorded on the commit object.
hooks_run: Vec<HookName>Hooks that were installed and ran during this commit: pre-commit, commit-msg,
post-commit, and post-rewrite (with amend) when CommitRequest::amend is set.
changes: usizeNumber of path-level changes between the parent commit tree and this commit’s tree.
change_id: Option<ChangeId>Stored change-id header when present on the new commit object.
files: Vec<CommitFile>Path-level changes vs the parent tree (git diff --name-status between parent and new tree).
Implementations§
Source§impl CommitOutcome
impl CommitOutcome
Sourcepub fn is_detached(&self) -> bool
pub fn is_detached(&self) -> bool
Whether the commit was made on a detached HEAD (Self::branch is None).