#[non_exhaustive]pub enum RevParseError {
Show 29 variants
NoUpstream {
branch: String,
},
UpstreamNotTracked {
merge: String,
},
NoPushRemote,
PushRefspecMissing {
remote: String,
branch: String,
},
PushDefaultNothing,
NoUpstreamForPush {
branch: String,
},
PushDefaultSimpleMismatch,
NoPushTrackingRef {
branch: String,
},
HeadNotBranch,
NoSuchBranch {
branch: String,
},
AmbiguousRefname {
spec: String,
},
AutoMergeRead {
detail: String,
},
InvalidObjectName {
name: String,
},
RevisionOutOfRange {
spec: String,
},
OutsideRepository {
path: String,
work_tree: String,
},
AmbiguousArgument {
spec: String,
},
AmbiguousShortObject {
spec: String,
},
ReflogEmpty {
ref_display: String,
},
ReflogInsufficientEntries {
ref_display: String,
available: usize,
},
PathOnDiskNotInRevision {
path: String,
revision: String,
},
PathPrefixExists {
candidate: String,
path: String,
alternate_spec: Option<String>,
},
PathNotInRevision {
path: String,
revision: String,
},
PathMissingFromWorktreeAndIndex {
path: String,
},
PathWrongIndexStage {
path: String,
stage: u8,
alternate_spec: Option<String>,
},
PathIndexPrefixMismatch {
candidate: String,
path: String,
alternate_spec: Option<String>,
},
PathOnDiskNotInIndex {
path: String,
},
PathNotInIndex {
path: String,
},
InternalDescribeRegex,
AmbiguousChangeId {
prefix: String,
candidates: Vec<AmbiguousChangeIdHint>,
},
}Expand description
Failure modes when resolving revision specs, upstream/push refs, paths, and reflogs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoUpstream
branch.<name>.merge / remote tracking is not configured.
UpstreamNotTracked
Upstream is configured but the remote-tracking ref is missing.
NoPushRemote
No remote is configured for @{push} resolution.
PushRefspecMissing
Remote has push refspecs but none map this branch.
PushDefaultNothing
push.default = nothing and no overriding push refspec applies.
NoUpstreamForPush
push.default = upstream but no upstream tracking ref exists.
PushDefaultSimpleMismatch
push.default = simple and upstream differs from the branch’s push ref.
NoPushTrackingRef
Default push mode could not find a tracking ref for the branch.
HeadNotBranch
HEAD is not on a local branch (detached or unborn).
NoSuchBranch
Named branch does not exist under refs/heads/.
AmbiguousRefname
Short ref name matches more than one ref under DWIM rules.
AutoMergeRead
Could not read .git/AUTO_MERGE.
InvalidObjectName
Spec fragment is not a valid object name after other resolution failed.
RevisionOutOfRange
Parent/ancestor navigation (~, ^, …) ran past the first root commit.
OutsideRepository
Path in rev:path lies outside the work tree.
Fields
AmbiguousArgument
Revision string matches neither an object, ref, nor index path.
AmbiguousShortObject
A short hex prefix matches more than one object.
ReflogEmpty
Reflog selector used but the reflog has no entries.
ReflogInsufficientEntries
Reflog index is out of range.
PathOnDiskNotInRevision
Tree path exists at HEAD but not at the requested revision.
Fields
PathPrefixExists
Tree path missing; a related path exists under the current prefix.
Fields
PathNotInRevision
Path is absent from the named tree.
Fields
PathMissingFromWorktreeAndIndex
Index path lookup failed with no work-tree match.
PathWrongIndexStage
Index path exists at another stage.
Fields
PathIndexPrefixMismatch
Index path mismatch under a path prefix.
Fields
PathOnDiskNotInIndex
File exists in the work tree but is not staged.
PathNotInIndex
Path is not present in the index at all.
InternalDescribeRegex
Internal describe helper failed to compile its regex.
AmbiguousChangeId
A change-id prefix matches more than one commit.
Fields
candidates: Vec<AmbiguousChangeIdHint>Matching commits in stable order (oid, then change id).
Trait Implementations§
Source§impl Debug for RevParseError
impl Debug for RevParseError
Source§impl Display for RevParseError
impl Display for RevParseError
Source§impl Error for RevParseError
impl Error for RevParseError
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()