Enum branchless::core::eventlog::Event [−][src]
pub enum Event { RewriteEvent { timestamp: f64, event_tx_id: EventTransactionId, old_commit_oid: Oid, new_commit_oid: Oid, }, RefUpdateEvent { timestamp: f64, event_tx_id: EventTransactionId, ref_name: String, old_ref: Option<String>, new_ref: Option<String>, message: Option<String>, }, CommitEvent { timestamp: f64, event_tx_id: EventTransactionId, commit_oid: Oid, }, HideEvent { timestamp: f64, event_tx_id: EventTransactionId, commit_oid: Oid, }, UnhideEvent { timestamp: f64, event_tx_id: EventTransactionId, commit_oid: Oid, }, }
Expand description
An event that occurred to one of the commits in the repository.
Variants
Indicates that the commit was rewritten.
Examples of rewriting include rebases and amended commits.
We typically want to mark the new version of the commit as visible and the old version of the commit as hidden.
Show fields
Fields of RewriteEvent
timestamp: f64
The timestamp of the event.
event_tx_id: EventTransactionId
The transaction ID of the event.
old_commit_oid: Oid
The OID of the commit before the rewrite.
new_commit_oid: Oid
The OID of the commit after the rewrite.
Indicates that a reference was updated.
The most important reference we track is HEAD. In principle, we can also
track branch moves in this way, but Git doesn’t support the appropriate
hook until v2.29 (reference-transaction
).
Show fields
Fields of RefUpdateEvent
timestamp: f64
The timestamp of the event.
event_tx_id: EventTransactionId
The transaction ID of the event.
ref_name: String
The full name of the reference that was updated.
For example, HEAD
or refs/heads/master
.
old_ref: Option<String>
The old referent.
May be an OID (in the case of a direct reference) or another reference name (in the case of a symbolic reference).
new_ref: Option<String>
The updated referent.
This may not be different from the old referent.
May be an OID (in the case of a direct reference) or another reference name (in the case of a symbolic reference).
message: Option<String>
A message associated with the rewrite, if any.
Indicate that the user made a commit.
User commits should be marked as visible.
Show fields
Fields of CommitEvent
timestamp: f64
The timestamp of the event.
event_tx_id: EventTransactionId
The transaction ID of the event.
commit_oid: Oid
The new commit OID.
Indicates that a commit was explicitly hidden by the user.
If the commit in question was not already visible, then this has no practical effect.
Show fields
Fields of HideEvent
timestamp: f64
The timestamp of the event.
event_tx_id: EventTransactionId
The transaction ID of the event.
commit_oid: Oid
The OID of the commit that was hidden.
Indicates that a commit was explicitly un-hidden by the user.
If the commit in question was not already hidden, then this has no practical effect.
Show fields
Fields of UnhideEvent
timestamp: f64
The timestamp of the event.
event_tx_id: EventTransactionId
The transaction ID of the event.
commit_oid: Oid
The OID of the commit that was unhidden.
Implementations
Get the timestamp associated with this event.
Get the event transaction ID associated with this event.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Calls the given closure and return the result. Read more
Calls the given closure on self
.