#[non_exhaustive]pub enum IndexError {
Corrupt {
corrupt: IndexCorrupt,
detail: String,
},
Unmerged {
paths: Vec<String>,
},
PathPrefixConflict {
directory: PathBuf,
file: PathBuf,
},
FsmonitorExtensionTruncated,
FsmonitorExtensionBadVersion(u32),
FsmonitorExtensionEwahInvalid,
CacheTreeCorrupt,
LockHeld(LockHeldError),
PathIo(PathIoError),
Chmod {
path: String,
reason: IndexChmodReason,
},
FsmonitorHookFailed {
status: Option<i32>,
},
FsmonitorHookEmptyToken,
}Expand description
Failures while reading, writing, or deriving trees from the Git index.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Corrupt
On-disk index bytes or an extension could not be parsed.
Fields
corrupt: IndexCorruptStructured corruption site.
Unmerged
Stage 1/2/3 entries are present; a stage-0 tree cannot be built.
Fields
PathPrefixConflict
A file path is a prefix of another index path at the same tree level.
Fields
FsmonitorExtensionTruncated
The FSMN index extension ends before its header, token, or EWAH payload.
FsmonitorExtensionBadVersion(u32)
The FSMN extension header version is not supported.
FsmonitorExtensionEwahInvalid
The EWAH bitmap embedded in FSMN could not be decoded.
CacheTreeCorrupt
The cache-tree extension references more entries than the index contains.
LockHeld(LockHeldError)
.git/index.lock (or GIT_INDEX_FILE.lock) is held by another process.
PathIo(PathIoError)
Filesystem I/O on the index or a related git-dir path.
Chmod
update-index --chmod / staging hint rejected the path or mode.
Fields
reason: IndexChmodReasonWhy the mode change was rejected.
FsmonitorHookFailed
The core.fsmonitor hook exited unsuccessfully.
FsmonitorHookEmptyToken
The core.fsmonitor hook (protocol version 2) answered without a token.
Implementations§
Source§impl IndexError
impl IndexError
Sourcepub fn kind_name(&self) -> &'static str
pub fn kind_name(&self) -> &'static str
Stable snake_case kind name matching legacy crate::error::Error slugs.
Sourcepub fn area(&self) -> &'static str
pub fn area(&self) -> &'static str
Functional area for analytics and JSON (area), matching Error::area when wrapped.
Trait Implementations§
Source§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
Source§impl Error for IndexError
impl Error for IndexError
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()