Skip to main content

OffloadError

Enum OffloadError 

Source
#[non_exhaustive]
pub enum OffloadError { RemoteNotConfigured { remote: String, }, LopNotLocal { remote: String, url: String, }, LopNotARepository { path: PathBuf, }, LopIsMainRepository, HashAlgoMismatch { main: HashAlgo, lop: HashAlgo, }, NoThreshold { remote: String, }, NotInLopAfterCopy { oid: ObjectId, }, KeptPackObjectPromised { pack: PathBuf, oid: ObjectId, referrer: ObjectId, }, MaintenanceRunning { holder: GcLockHolder, }, }
Expand description

Why offload_blobs refused to run.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

RemoteNotConfigured

remote.<name>.url is not set in the main repository.

Fields

§remote: String

The remote named in OffloadOptions::remote.

§

LopNotLocal

The remote’s URL is not a local path and no OffloadOptions::lop_git_dir was given.

Fields

§remote: String

The remote name.

§url: String

Its configured URL (credentials removed).

§

LopNotARepository

The LOP location is not a Git repository.

Fields

§path: PathBuf

Where the LOP was looked for.

§

LopIsMainRepository

The LOP is the main repository itself, or stores its objects in the same directory (a linked worktree of it, or an objects/ linked to its).

§

HashAlgoMismatch

The two repositories use different object formats.

Fields

§main: HashAlgo

The main repository’s object format.

§lop: HashAlgo

The LOP’s object format.

§

NoThreshold

No filter was given and the remote has no partialCloneFilter.

Fields

§remote: String

The remote name.

§

NotInLopAfterCopy

A blob copied to the LOP cannot be found there afterwards; nothing was removed from the main repository.

Fields

§oid: ObjectId

The blob.

§

KeptPackObjectPromised

An ordinary .keep pack (one without .promisor) of the main repository holds the only copy of an object that a commit, tree or tag going into the promisor pack names. Git counts every object a promisor-pack object names as promised, and its repack -a -d keeps a promised object only in a promisor pack: once the marker goes, it would delete this one, which no promisor has. Offload does not rewrite kept packs, and a copy in the promisor pack does not help (Git’s repack leaves out objects a kept pack holds), so it refuses before changing anything. Removing the marker lets offload fold the pack in; marking the pack .promisor keeps it as it is.

Fields

§pack: PathBuf

The kept pack holding the object.

§oid: ObjectId

The object.

§referrer: ObjectId

An object going into the promisor pack that names it.

§

MaintenanceRunning

Another maintenance run holds the main repository’s gc.pid lock.

Fields

§holder: GcLockHolder

Who holds the lock.

Trait Implementations§

Source§

impl Debug for OffloadError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for OffloadError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for OffloadError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<OffloadError> for Error

Source§

fn from(source: OffloadError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.