pub enum CheckoutError {
Show 24 variants
NotOffered {
url: String,
endpoint: String,
},
Server {
url: String,
status: u16,
message: String,
},
InvalidUrl(String),
InvalidPath {
path: String,
reason: &'static str,
},
MissingPath {
path: String,
base: String,
},
Mismatch {
expected: String,
got: String,
},
DestinationNotEmpty(PathBuf),
InvalidBranchName(String),
DamagedRecord {
id: String,
path: PathBuf,
detail: String,
},
RefKeptMoving {
refname: String,
},
WorkBranchTaken {
name: String,
},
SnapshotMoved {
expected: String,
got: String,
},
BranchMoved {
name: String,
expected: String,
got: String,
},
UnrelatedBranch {
name: String,
},
StillSwitched {
branch: String,
failed: Box<CheckoutError>,
},
OperationInProgress(InProgressOperation),
Remote(Box<RemoteError>),
Pull(Box<PullError>),
Protocol {
url: String,
detail: String,
},
Download(Box<ResumableError>),
PromisedBlobs {
oid: ObjectId,
count: usize,
},
PromisedBlobsNotFetched {
oid: ObjectId,
count: usize,
source: Box<Error>,
},
Library(Box<Error>),
Io(Error),
}Expand description
Why a snapshot checkout failed.
Variants§
NotOffered
The server has no snapshot-checkout endpoint for this repository.
Server
The server refused a request.
Fields
InvalidUrl(String)
The URL cannot name a repository.
InvalidPath
A path is not a plain path inside the repository.
MissingPath
A path is not in the tree being checked out.
Mismatch
The downloaded snapshot is not the one the server described.
Fields
DestinationNotEmpty(PathBuf)
The destination already has files.
InvalidBranchName(String)
A name is not a valid branch name.
DamagedRecord
A checkout’s stored record could not be read.
Fields
RefKeptMoving
A ref kept moving while the server tried to set it.
WorkBranchTaken
Every work-branch name the server reserved is a branch in the checkout already.
SnapshotMoved
The snapshot fetched is not the one the server described: the checkout was refreshed again (from another worktree, say) meanwhile.
Fields
BranchMoved
The projection of a server branch fetched is not the one the server described: the branch was shown to the checkout again meanwhile.
Fields
A local branch shares no commit with the server’s branch of its name, as the checkout sees it, and builds on none of its snapshots.
StillSwitched
A branch that HEAD was switched to for its rebase couldn’t be
rebased, and HEAD couldn’t be switched back: it is still on the
branch.
OperationInProgress(InProgressOperation)
The checkout is in the middle of an operation (a stopped rebase, a merge) that has to be finished or aborted first.
Remote(Box<RemoteError>)
A fetch from or push to the server failed.
Pull(Box<PullError>)
Bringing the current branch onto the new snapshot failed.
Protocol
The server’s answer could not be parsed.
Download(Box<ResumableError>)
The download failed.
PromisedBlobs
The snapshot needs blobs the repository keeps on a promisor remote (a
large-object promisor), and lazy fetch is off, so they cannot be brought in.
As for upload-pack, lazy fetch is turned on with uploadpack.lazyFetch or
GIT_NO_LAZY_FETCH=0 on the server (see fetch_promised_blobs).
PromisedBlobsNotFetched
The snapshot’s blobs kept on a promisor remote were fetched, but the fetch failed or did not bring them all.
Fields
Library(Box<Error>)
A repository operation failed.
Io(Error)
A file operation failed.
Trait Implementations§
Source§impl Debug for CheckoutError
impl Debug for CheckoutError
Source§impl Display for CheckoutError
impl Display for CheckoutError
Source§impl Error for CheckoutError
impl Error for CheckoutError
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()