#[non_exhaustive]pub enum RepoEvent {
#[non_exhaustive] HeadMoved {
from: Option<String>,
to: Option<String>,
},
#[non_exhaustive] BranchSwitched {
from: Option<String>,
to: Option<String>,
},
#[non_exhaustive] BranchCreated {
name: String,
},
#[non_exhaustive] BranchDeleted {
name: String,
},
#[non_exhaustive] WorkingCopyChanged {
dirty: bool,
change_count: usize,
},
#[non_exhaustive] UpstreamChanged {
upstream: Option<String>,
},
#[non_exhaustive] AheadBehindChanged {
ahead: Option<usize>,
behind: Option<usize>,
},
#[non_exhaustive] OperationChanged {
from: OperationState,
to: OperationState,
},
#[non_exhaustive] ConflictChanged {
conflicted: bool,
},
}Expand description
One typed change to a repository’s observable state, derived by diffing two
consecutive RepoSnapshots (plus the branch set).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]HeadMoved
The working-copy commit moved (a commit, checkout, reset, jj op, …).
from/to are the full object ids; None on an unborn git repo.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]BranchSwitched
The current branch (git) / bookmark (jj) changed — a switch/checkout, or
going (in)to a detached/unset state (None).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]BranchCreated
A local branch/bookmark appeared.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]BranchDeleted
A local branch/bookmark was removed.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]WorkingCopyChanged
The working-copy dirtiness or change count changed (an edit was staged, committed, stashed, snapshotted, …).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UpstreamChanged
The upstream tracking branch changed (git only; always absent on jj).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]AheadBehindChanged
The ahead/behind counts versus the upstream changed (git only).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]OperationChanged
The in-progress operation changed — a git merge, rebase, am,
cherry-pick, revert, or bisect started or finished. A transition to/from
OperationState::Conflict (jj’s conflict marker) is not reported here:
vcs-core derives jj’s operation and conflicted from the same bit, so
ConflictChanged already signals it on both
backends. So this event fires only on git, and from/to are
Clear/Merge/Rebase/ApplyMailbox/CherryPick/Revert/Bisect.
Fields
This variant is marked as non-exhaustive
from: OperationStateThe previous operation state.
to: OperationStateThe new operation state.
#[non_exhaustive]ConflictChanged
Whether the working copy has an unresolved conflict changed.