#[non_exhaustive]pub enum NotesError {
AlreadyExists {
object: ObjectId,
},
InvalidRef {
name: String,
},
UnknownRewriteMode {
mode: String,
},
RefNotCommit {
notes_ref: String,
found: ObjectKind,
},
UnexpectedObjectKind {
oid: ObjectId,
expected: ObjectKind,
found: ObjectKind,
},
MergeBothEmpty {
local: String,
remote: String,
},
MergeInProgress {
path: PathBuf,
},
}Expand description
Notes failure: notes refs, the notes tree layout, rewrite configuration, and notes merges.
Surfaced on the umbrella as Error::Notes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlreadyExists
RepositoryNotes::add was called without
force when a note already exists on the object.
InvalidRef
A configured or environment notes ref is not under refs/notes/.
UnknownRewriteMode
Unknown notes.rewriteMode or GIT_NOTES_REWRITE_MODE value.
RefNotCommit
A notes ref resolves to an object that cannot hold notes (notes reads accept a commit or a tree; notes merges require a commit).
Fields
found: ObjectKindKind of object the ref resolved to.
UnexpectedObjectKind
An object reached while reading a notes tree has the wrong kind (for example a note entry that is not a blob).
Fields
expected: ObjectKindKind the notes layout requires at this position.
found: ObjectKindKind actually stored.
MergeBothEmpty
notes_merge_inner was asked to merge two notes refs
that both have no notes commit.
Fields
MergeInProgress
A manual notes merge was started while an earlier one still has conflict files in the notes merge worktree.
Implementations§
Trait Implementations§
Source§impl Debug for NotesError
impl Debug for NotesError
Source§impl Display for NotesError
impl Display for NotesError
Source§impl Error for NotesError
impl Error for NotesError
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()