pub enum UpdateMode {
New,
FastForward,
Forced,
UpToDate,
NoChangeNeeded,
NonFastForwardRejected,
TagUpdateRejected,
SourceObjectNotFound,
Unborn,
DeletedMissing,
RefLockRejected,
}Expand description
How a single reference resolved during a fetch (or would resolve in a push).
Mirrors the shapes of gix::remote::fetch::refs::update::Mode that jj
already consumes, so the embedder’s translation layer stays a thin adapter.
Variants§
New
The local tracking ref did not exist and was created.
FastForward
The update advanced the ref along its existing history.
Forced
A non-fast-forward update that was applied because force was requested.
UpToDate
The local ref already matched the remote value; nothing to do.
NoChangeNeeded
No change was required (e.g. a no-op refspec).
NonFastForwardRejected
A non-fast-forward update that was rejected (force not requested).
TagUpdateRejected
A tag update was rejected (tags are not overwritten without force).
SourceObjectNotFound
The source object named by the refspec was not found on the remote.
Unborn
The remote ref is unborn (points at nothing yet).
DeletedMissing
A prune/delete was requested but the local ref was already missing.
RefLockRejected
The local tracking ref could not be created or updated (namespace conflict, lock, …).
Implementations§
Source§impl UpdateMode
impl UpdateMode
Sourcepub fn modified_repo(self) -> bool
pub fn modified_repo(self) -> bool
Returns whether fetch applied this update to the local repository.
Rejected or no-op outcomes (for example an existing tag that moved on the remote) are excluded so callers can report only refs that actually changed.
Sourcepub fn is_rejected(self) -> bool
pub fn is_rejected(self) -> bool
Returns whether fetch refused this update (non-fast-forward without force, a moved tag, or a source missing on the remote).
Sourcepub fn is_reported(self) -> bool
pub fn is_reported(self) -> bool
Returns whether this update belongs in a fetch report: the ref changed
(Self::modified_repo) or the update was refused (Self::is_rejected).
Up-to-date, no-op and unborn refs are left out.