#[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
RemoteNotConfigured
remote.<name>.url is not set in the main repository.
Fields
remote: StringThe remote named in OffloadOptions::remote.
LopNotLocal
The remote’s URL is not a local path and no OffloadOptions::lop_git_dir
was given.
LopNotARepository
The LOP location is not a Git repository.
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.
NoThreshold
No filter was given and the remote has no partialCloneFilter.
NotInLopAfterCopy
A blob copied to the LOP cannot be found there afterwards; nothing was removed from the main repository.
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
MaintenanceRunning
Another maintenance run holds the main repository’s gc.pid lock.
Fields
holder: GcLockHolderWho holds the lock.
Trait Implementations§
Source§impl Debug for OffloadError
impl Debug for OffloadError
Source§impl Display for OffloadError
impl Display for OffloadError
Source§impl Error for OffloadError
impl Error for OffloadError
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()