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, in order: pre-commit,
prepare-commit-msg, 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).
Trait Implementations§
Source§impl Clone for CommitOutcome
impl Clone for CommitOutcome
Source§impl Debug for CommitOutcome
impl Debug for CommitOutcome
impl Eq for CommitOutcome
Source§impl PartialEq for CommitOutcome
impl PartialEq for CommitOutcome
impl StructuralPartialEq for CommitOutcome
Auto Trait Implementations§
impl Freeze for CommitOutcome
impl RefUnwindSafe for CommitOutcome
impl Send for CommitOutcome
impl Sync for CommitOutcome
impl Unpin for CommitOutcome
impl UnsafeUnpin for CommitOutcome
impl UnwindSafe for CommitOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.