#[non_exhaustive]pub enum StashError {
Show 17 variants
CorruptStash {
oid: ObjectId,
reason: CorruptStashReason,
},
NotFound {
n: usize,
},
CommitNotOnStack {
oid: ObjectId,
},
NoInitialCommit,
BareRepository,
IndexConflict,
MissingHead,
WouldOverwriteLocalChanges {
paths: String,
},
IndexWrite {
source: PathIoError,
},
SymlinkNotUtf8,
CouldNotRestoreUntracked {
path: String,
},
HunkSelection(HunkSelectError),
Branch(BranchError),
Apply(ApplyError),
InvalidSignature(SignatureError),
PushValidation(StashPushValidationError),
WorktreeUpdateFailed {
path: String,
message: String,
},
}Expand description
Stash list, push, apply, pop, drop, and branch failures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CorruptStash
Stash W commit has an invalid parent layout.
Fields
reason: CorruptStashReasonWhat was wrong with the commit graph.
NotFound
stash@{{n}} is out of range for the current stash reflog.
CommitNotOnStack
A stash commit id was given to pop but is not on refs/stash.
NoInitialCommit
Push or create requires at least one commit on the current branch.
BareRepository
Apply, push, or pop requires a working tree.
IndexConflict
Apply with restore_index could not merge the current index with the stashed index parent.
MissingHead
HEAD does not resolve while applying a stash entry.
WouldOverwriteLocalChanges
Applying a stash would overwrite locally modified worktree content.
IndexWrite
The index could not be written after a successful stash apply.
Fields
source: PathIoErrorGit-directory path I/O failure.
SymlinkNotUtf8
A symlink blob in a stash commit is not valid UTF-8.
CouldNotRestoreUntracked
Applying a stash with an untracked-files parent would replace an existing worktree path.
HunkSelection(HunkSelectError)
Partial push hunk selection failed.
Branch(BranchError)
Branch create during stash branch failed validation or state checks.
Apply(ApplyError)
Patch application while building the W tree failed.
InvalidSignature(SignatureError)
Identity on push options could not be written into a commit.
PushValidation(StashPushValidationError)
Incompatible crate::stash::StashPushOptions flags (see StashPushValidationError).
WorktreeUpdateFailed
Worktree path update failed while finishing a stash push reset.
Implementations§
Trait Implementations§
Source§impl Debug for StashError
impl Debug for StashError
Source§impl Display for StashError
impl Display for StashError
Source§impl Error for StashError
impl Error for StashError
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()