Skip to main content

Warning

Enum Warning 

Source
#[non_exhaustive]
pub enum Warning {
Show 31 variants AmbiguousRefname { spec: String, }, DanglingSymref { name: String, }, CommitGraphChunkTooSmall { layer: String, chunk: String, }, CommitGraphBloomDisabled { layer: String, }, CommitGraphChangedPathIndexTooSmall, CommitGraphChangedPathChunkTooSmall { actual: usize, minimum: usize, }, CommitGraphChangedPathOffsetOutOfRange { offset: usize, position: usize, graph: String, chunk_size: usize, }, CommitGraphChangedPathOffsetsDecreasing { start: usize, end: usize, position_start: usize, position_end: usize, graph: String, }, IgnoredGitDir { path: PathBuf, reason: String, }, CoreBareWithWorktree, BadBooleanConfig { key: String, value: String, }, SuspiciousSubmoduleName { name: String, }, SubmoduleConfigLooksLikeOption { key: String, value: String, }, SubmoduleMultipleConfigs { commit: String, name: String, option: String, }, GitmodulesBadConfig { message: String, }, SplitIndexDisabledWhileConfigEnabled, SplitIndexEnabledWhileConfigDisabled, IndexVersionEnvInvalid { fallback: u32, }, IndexVersionConfigInvalid { fallback: u32, }, MailmapUnreadable { spec: String, kind: ObjectKind, }, ReflogNotWritten { refname: String, detail: String, }, NonExecutableHookIgnored { hook_name: String, hook_path: Option<PathBuf>, }, HookNotRun { hook_name: String, detail: String, }, MidxChecksumMismatch, MidxIgnoringExistingChecksumMismatch, MidxChunkTableError { detail: String, }, MidxRevIndexWrongSize, MidxBitmapMissingReverseIndex, MidxPackIndexUnavailable { pack: String, }, MidxUnknownPreferredPack { name: String, }, PackBitmapIgnored { path: PathBuf, reason: String, },
}
Expand description

A non-fatal condition worth surfacing to the user or an embedder.

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.
§

AmbiguousRefname

A ref name could mean both a branch/tag ref and an object id prefix.

Fields

§spec: String

User-supplied revision or pathspec fragment.

§

DanglingSymref

A symbolic ref pointed at a missing or invalid target (except bare HEAD).

Fields

§name: String

Pack file name or config identifier.

§

CommitGraphChunkTooSmall

A commit-graph chunk was smaller than required.

Fields

§layer: String

Commit-graph layer identifier in the warning.

§chunk: String

Commit-graph chunk name that failed validation.

§

CommitGraphBloomDisabled

Bloom filters were disabled for a commit-graph layer due to incompatible settings.

Fields

§layer: String

Commit-graph layer identifier in the warning.

§

CommitGraphChangedPathIndexTooSmall

Changed-path Bloom index chunk does not cover all commits in the layer.

§

CommitGraphChangedPathChunkTooSmall

Changed-path Bloom data chunk header is too small.

Fields

§actual: usize

Observed size or offset in bytes.

§minimum: usize

Minimum required size in bytes.

§

CommitGraphChangedPathOffsetOutOfRange

Changed-path Bloom index entry points past the chunk.

Fields

§offset: usize

Byte offset into a commit-graph chunk.

§position: usize

Index of the commit-graph entry being validated.

§graph: String

Path or label of the commit-graph file.

§chunk_size: usize

Total size of the commit-graph chunk in bytes.

§

CommitGraphChangedPathOffsetsDecreasing

Changed-path Bloom index offsets decrease between adjacent entries.

Fields

§start: usize

Starting offset for an adjacent pair of entries.

§end: usize

Ending offset for an adjacent pair of entries.

§position_start: usize

Commit index for the start offset.

§position_end: usize

Commit index for the end offset.

§graph: String

Path or label of the commit-graph file.

§

IgnoredGitDir

Repository config was skipped because the git directory uses an unsupported format.

Fields

§path: PathBuf

Repository-relative or filesystem path related to the failure.

§reason: String

Why the value or operation was rejected.

§

CoreBareWithWorktree

core.bare=true while core.worktree is also set.

§

BadBooleanConfig

A config value looked boolean but could not be parsed.

Fields

§key: String

Config key name that failed validation.

§value: String

Raw config value that could not be parsed.

§

SuspiciousSubmoduleName

Submodule name failed validation.

Fields

§name: String

Pack file name or config identifier.

§

SubmoduleConfigLooksLikeOption

Submodule config value looked like a command-line flag.

Fields

§key: String

Config key name that failed validation.

§value: String

Raw config value that could not be parsed.

§

SubmoduleMultipleConfigs

Duplicate submodule keys in .gitmodules for one commit tree.

Fields

§commit: String

Commit object id or label tied to the warning.

§name: String

Pack file name or config identifier.

§option: String

Config option or submodule key name.

§

GitmodulesBadConfig

.gitmodules could not be parsed at a given line.

Fields

§message: String

Free-form diagnostic message body.

§

SplitIndexDisabledWhileConfigEnabled

Split index was requested while core.splitIndex disables it.

§

SplitIndexEnabledWhileConfigDisabled

Split index was disabled on the command line while config enables it.

§

IndexVersionEnvInvalid

GIT_INDEX_VERSION was set but invalid.

Fields

§fallback: u32

Index version used after the invalid setting was ignored.

§

IndexVersionConfigInvalid

index.version in config was invalid.

Fields

§fallback: u32

Index version used after the invalid setting was ignored.

§

MailmapUnreadable

mailmap.blob (or the bare-repository HEAD:.mailmap default) names an object that is not a blob; it was skipped.

Fields

§spec: String

The configured blob revision, as written.

§kind: ObjectKind

Kind of the object the revision resolved to.

§

ReflogNotWritten

A ref was updated but its reflog line could not be appended; the update stands.

Fields

§refname: String

Ref whose reflog was not updated (for example refs/heads/main or HEAD).

§detail: String

Why the append failed.

§

NonExecutableHookIgnored

A traditional hook script exists but is not executable.

Fields

§hook_name: String

Hook script basename that was skipped.

§hook_path: Option<PathBuf>

Resolved path to the hook script, when known.

§

HookNotRun

A hook whose outcome does not affect the operation (such as post-commit) could not be run; the operation already completed.

Fields

§hook_name: String

Hook event name (post-commit, …).

§detail: String

Why it did not run, including the underlying OS error.

§

MidxChecksumMismatch

Returned when midx checksum mismatch.

§

MidxIgnoringExistingChecksumMismatch

Returned when midx ignoring existing checksum mismatch.

§

MidxChunkTableError

Returned when midx chunk table error.

Fields

§detail: String

Additional human-readable detail for the failure.

§

MidxRevIndexWrongSize

Returned when midx rev index wrong size.

§

MidxBitmapMissingReverseIndex

Returned when midx bitmap missing reverse index.

§

MidxPackIndexUnavailable

Returned when midx pack index unavailable.

Fields

§pack: String

Pack file basename (.pack suffix).

§

MidxUnknownPreferredPack

Returned when midx unknown preferred pack.

Fields

§name: String

Pack file name or config identifier.

§

PackBitmapIgnored

A .bitmap sidecar was present but could not be loaded; reachability falls back without it.

Fields

§path: PathBuf

Repository-relative or filesystem path related to the failure.

§reason: String

Why the value or operation was rejected.

Trait Implementations§

Source§

impl Clone for Warning

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Warning

Source§

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

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

impl Eq for Warning

Source§

impl Hash for Warning

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Warning

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Warning

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Sequence for T
where T: Eq + Hash,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.