pub enum StatusHeader {
Branch(StandingHeader),
MergeInProgress,
RebaseInProgress {
branch: Option<String>,
onto: Option<String>,
},
OtherInProgress,
}Expand description
Status header after branch standing and in-progress operation overrides.
Variants§
Branch(StandingHeader)
Normal branch vs target/upstream summary.
MergeInProgress
A merge is in progress (MERGE_HEAD exists).
RebaseInProgress
A rebase is in progress, started by grit or by git (rebase-merge/ or rebase-apply/).
HEAD is detached while the rebase replays; the branch being rebased comes from the
rebase state’s head-name.
Fields
OtherInProgress
Another in-progress operation (cherry-pick, revert, bisect, …).
Implementations§
Source§impl StatusHeader
impl StatusHeader
Sourcepub fn resolve(
standing: &BranchStanding,
state: &WtStatusState,
operations: &[InProgressOperation],
) -> Self
pub fn resolve( standing: &BranchStanding, state: &WtStatusState, operations: &[InProgressOperation], ) -> Self
Choose the header line, preferring merge/rebase overrides over branch standing.
§Parameters
standing: branch comparison used when no operation is in progress.state: in-progress state fromwt_status_get_state.operations: sentinels fromdetect_in_progress.
Sourcepub fn primary_comparison_name(standing: &BranchStanding) -> Option<&str>
pub fn primary_comparison_name(standing: &BranchStanding) -> Option<&str>
Short ref name for the primary header comparison (target, else upstream).
Sourcepub fn pull_integration_ref(standing: &BranchStanding) -> Option<&str>
pub fn pull_integration_ref(standing: &BranchStanding) -> Option<&str>
Ref name for a grit pull hint: upstream when configured, otherwise target.
Prefer status_integration_hint for status footers; pull is not always the right action.
Trait Implementations§
Source§impl Clone for StatusHeader
impl Clone for StatusHeader
Source§impl Debug for StatusHeader
impl Debug for StatusHeader
impl Eq for StatusHeader
Source§impl PartialEq for StatusHeader
impl PartialEq for StatusHeader
impl StructuralPartialEq for StatusHeader
Auto Trait Implementations§
impl Freeze for StatusHeader
impl RefUnwindSafe for StatusHeader
impl Send for StatusHeader
impl Sync for StatusHeader
impl Unpin for StatusHeader
impl UnsafeUnpin for StatusHeader
impl UnwindSafe for StatusHeader
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.