pub enum FailedRefExportReason {
ModifiedConcurrentlyInGit {
found: ObjectId,
intended: ObjectId,
},
DeletedInGit {
intended: ObjectId,
},
FailedToSet(String),
FailedToDelete(String),
}Expand description
Why a single ref could not be published to the Git projection.
Every arm is a REPORT, never an attempted repair: heddle names what it found on the Git side and leaves the ref exactly as it is, for the operator to reconcile (import first, or force). Auto-resolving a ref another writer just moved is how that writer’s commits get lost.
Variant names are heddle-native but map 1:1 onto jj’s FailedRefExportReason
(lib/src/git.rs), so a future port translates without re-deriving the
taxonomy: ModifiedConcurrentlyInGit <-> jj DeletedInJjModifiedInGit,
DeletedInGit <-> jj ModifiedInJjDeletedInGit, and FailedToSet /
FailedToDelete <-> the same-named jj arms.
Variants§
ModifiedConcurrentlyInGit
The Git ref does not hold the value heddle based its update on: it moved
underneath the export (a git push, git branch -f, or another tool
writing the mirror). Covers both the tip that had ALREADY diverged when
export read it and the one that changed inside the read-write window.
Fields
DeletedInGit
heddle read the ref, then found it gone by the time it wrote: deleted on the Git side mid-export.
FailedToSet(String)
The ref write failed for a reason that is NOT a demonstrable race – a locked ref, an IO error, an invalid name. Kept distinct so a lost race is never inferred from a failure we cannot attribute to another writer.
FailedToDelete(String)
The ref delete failed, likewise for a non-race reason.
Trait Implementations§
Source§impl Clone for FailedRefExportReason
impl Clone for FailedRefExportReason
Source§fn clone(&self) -> FailedRefExportReason
fn clone(&self) -> FailedRefExportReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FailedRefExportReason
impl Debug for FailedRefExportReason
Source§impl Display for FailedRefExportReason
impl Display for FailedRefExportReason
impl Eq for FailedRefExportReason
Source§impl Error for FailedRefExportReason
impl Error for FailedRefExportReason
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()