#[non_exhaustive]pub enum Error {
Show 161 variants
NotARepository(String),
ForbiddenBareRepository(String),
DubiousOwnership(String),
UnsupportedRepositoryFormatVersion(u32),
UnsupportedRepositoryExtension(String),
InvalidRefStorageFormat {
value: String,
},
InitObjectFormatChange,
InitBareWithSeparateGitDir,
InvalidObjectId(String),
HashCollision {
oid: ObjectId,
},
ObjectNotFound(String),
RevisionNotFound(String),
PromisedObjectMissing(ObjectId),
CorruptObject(String),
PackIndexChecksumMismatch {
path: PathBuf,
mismatch: TrailerMismatch,
},
UnresolvedDeltas {
count: u64,
},
InvalidObject {
kind: ObjectKind,
check: FsckError,
},
InvalidTreeEntry(TreeEntryError),
InvalidSignature(SignatureError),
UnexpectedObjectKind {
oid: ObjectId,
expected: ObjectKind,
actual: ObjectKind,
},
CommitGraphParentMissing {
commit: ObjectId,
parent: ObjectId,
},
DeltaChainTooDeep {
limit: usize,
},
UnknownObjectType(String),
ObjectHeaderTooLong {
oid: String,
},
Io(Error),
LockHeld {
path: PathBuf,
holder: Option<LockHolder>,
},
Zlib(String),
LooseHashMismatch {
path: String,
real_oid: String,
},
LooseObjectWrite {
path: String,
source: Error,
},
WorktreePathIo {
path: String,
operation: WorktreePathOperation,
source: Error,
},
GitDirPathIo {
path: String,
operation: GitDirPathOperation,
source: Error,
},
ObjectStreamTruncated {
expected: u64,
actual: u64,
},
WorktreeFileChanged {
path: String,
},
IndexError(String),
IndexUnmerged,
MaintenanceRunning {
holder: GcLockHolder,
},
UnmergedConflictMarkers {
paths: Vec<String>,
},
IndexPathPrefixConflict {
directory: PathBuf,
file: PathBuf,
},
IndexFsmonitorExtensionTruncated,
IndexFsmonitorExtensionBadVersion(u32),
IndexFsmonitorExtensionEwahInvalid,
CacheTreeCorrupt,
InvalidRef(String),
PackedRefsUnexpectedLine {
path: String,
line: String,
},
PathError(String),
PathspecFromFile(PathspecFromFileParseError),
InvalidPath(String),
InvalidPathComponent {
path: String,
reason: PathComponentError,
},
Config(ConfigError),
Branch(BranchError),
RefLock(RefLockError),
RefStore(RefStoreError),
Reftable(ReftableError),
Filter(FilterError),
Apply(ApplyError),
DiffPath(DiffPathError),
PathOutsideRepo(PathOutsideRepoError),
Signing(String),
Auth {
url: String,
reason: AuthFailure,
},
PushOptionsUnsupported,
FetchUnshallowNotShallow,
FetchShallowUnsupported,
FetchDeepenRelativeUnsupported,
BundleMissingPrerequisites,
ReceivedPackTempMissing {
path: PathBuf,
},
InvalidAttrPathspec {
spec: String,
reason: AttrPathspecError,
},
PathspecNoMatch {
spec: String,
},
RestoreConflictWithStaged,
RestoreConflictWithSource,
RestoreConflictMissingTheirs {
path: String,
},
RestoreConflictMissingOurs {
path: String,
},
RestoreConflictNotUnmerged {
path: String,
},
RestorePathUnmerged {
paths: Vec<String>,
},
PathspecBeyondSymlink {
spec: String,
},
PartialCommitDuringMerge,
PathspecIgnored {
paths: Vec<String>,
},
RemoveBlocked {
paths: Vec<BlockedRemoval>,
},
NotRemovingRecursively(String),
RequiresWorkTree,
EmptyCommitMessage,
RemovePathsRequired,
MoveSourceNotTracked {
src: String,
},
MoveDestinationExists {
src: String,
destination: String,
},
MoveIntoSubdirectory {
src: String,
destination: String,
},
MoveIntoSelf {
src: String,
destination: String,
},
MoveNothingToMove {
src: String,
},
MoveDuplicateDestination {
destination: String,
},
MoveBadSource {
src: String,
destination: String,
},
MoveMissingIndexEntry {
path: String,
},
RemoteUnreadable {
url: Option<String>,
reason: RemoteUnreadableReason,
},
FetchRefspec(FetchRefspecError),
FetchNonFastForward {
local_ref: String,
},
FetchIntoCheckedOutBranch {
branch: String,
},
WouldOverwrite {
reason: OverwriteReason,
paths: Vec<String>,
message: String,
},
DirtyWorktree {
operation: WorktreeOperation,
paths: Vec<String>,
},
InvalidIdentity(CommitIdentityError),
Cancelled,
Identity(IdentityError),
Message(String),
NotFastForward,
NothingToCommit,
NothingStagedToCommit {
unstaged: usize,
untracked: usize,
},
DetachedHead,
UnbornHead,
InvalidHead,
MergeCommit {
oid: ObjectId,
},
ReplaySourceAtHead,
SequencerUnknownCommand {
command: String,
},
ReplayAbortHeadMoved,
ReplayContinueUnmerged,
NoReplayInProgress,
OperationInProgress(InProgressOperation),
BranchCheckedOutInWorktree {
branch: String,
worktree_path: String,
},
BranchNotFound {
branch: String,
},
BranchListNamesDateSort,
CannotDeleteCurrentBranch {
branch: String,
},
BranchNotMerged {
branch: String,
},
TagNotFound {
tag: String,
},
Tag(TagError),
Worktree(WorktreeError),
CorruptStash(&'static str),
StashNotFound {
n: usize,
},
ReflogUnknownRef {
refname: String,
},
ReflogInvalidSelector {
spec: String,
},
ReflogInvalidIndex {
spec: String,
source: ParseIntError,
},
ReflogIndexOutOfRange {
refname: String,
index: usize,
},
StashNoInitialCommit,
StashBareRepository,
StashIndexConflict,
StashOptionConflict(String),
HunkSelection(HunkSelectError),
StashMissingHead,
StashWouldOverwriteLocalChanges {
paths: String,
},
StashIndexWrite(String),
StashSymlinkNotUtf8,
StashCouldNotRestoreUntracked {
path: String,
},
AmendUnborn,
NoteAlreadyExists {
object: ObjectId,
},
InvalidNotesRef(String),
NotesRefNotCommit {
notes_ref: String,
found: ObjectKind,
},
NotesObjectKind {
oid: ObjectId,
expected: ObjectKind,
found: ObjectKind,
},
NotesMergeBothEmpty {
local: String,
remote: String,
},
NotesMergeInProgress {
path: PathBuf,
},
Midx(MidxError),
RevParse(RevParseError),
RevList(RevListError),
Hook(HookError),
History(HistoryError),
UnsupportedObjectStore {
operation: &'static str,
},
OdbObjectsDirMismatch {
builder: PathBuf,
repository: PathBuf,
},
TreeSha256InvalidHex,
TreeSha256InvalidRevision {
found: ObjectKind,
},
TreeSha256MissingSubmodules(Vec<MissingSubmodule>),
TreeSha256RequiresSigning,
TagVerifyNotTag {
oid: ObjectId,
found: ObjectKind,
},
TagVerifyMissingObjectHeader,
TagVerifyDuplicateTreeSha256Header,
TreeSha256Claim(TreeSha256ClaimError),
BlameIgnoreRevUnknown {
rev: String,
},
BlameIgnoreRevsFileOpen {
path: String,
source: Error,
},
BlameIgnoreRevsFileInvalidRev {
path: String,
rev: String,
},
}Expand description
The top-level error type for all grit-lib operations.
§Examples
use grit_lib::error::Error;
let err = Error::Message("repository not found".into());
assert!(err.to_string().contains("repository not found"));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotARepository(String)
A repository could not be found or is structurally invalid.
ForbiddenBareRepository(String)
A bare repository was found but access is forbidden by safe.bareRepository.
DubiousOwnership(String)
The repository is owned by a different user (safe.directory).
UnsupportedRepositoryFormatVersion(u32)
Repository format version is not supported by this implementation.
UnsupportedRepositoryExtension(String)
Repository declares an unsupported extension.
InvalidRefStorageFormat
extensions.refStorage names an unsupported backend.
InitObjectFormatChange
crate::repo::Repository::init_with_outcome refused to change object format on reinit.
InitBareWithSeparateGitDir
crate::repo::Repository::init_with_outcome with incompatible --bare and separate git dir.
InvalidObjectId(String)
A supplied object ID string was not valid hex or the wrong length.
HashCollision
SHA-1 object hashing detected a chosen-prefix collision (sha1dc).
ObjectNotFound(String)
The requested object does not exist in the object store.
RevisionNotFound(String)
A revision expression (branch, tag, object id, x~n, ORIG_HEAD, …) names nothing in
the repository. Holds the expression as the caller wrote it.
PromisedObjectMissing(ObjectId)
A partial-clone promisor object is not present locally and no fetcher ran.
CorruptObject(String)
An object’s stored data is corrupt or malformed.
PackIndexChecksumMismatch
A pack index (.idx) file’s trailing checksum does not match its contents.
Only reported by reads that verify the index trailer, such as
crate::pack::read_pack_index; the checksum of the .pack the index
describes is checked separately.
Fields
mismatch: TrailerMismatchExpected and stored trailer digests.
UnresolvedDeltas
Indexing or unpacking a pack left deltas whose bases are neither in the pack nor in the object database: a thin pack without its bases, or a ref-delta cycle.
InvalidObject
crate::objects::Objects::write refused a payload that git fsck would reject;
nothing was written.
Fields
kind: ObjectKindKind the payload was meant to be stored as.
InvalidTreeEntry(TreeEntryError)
crate::objects::Objects::write_tree refused an entry.
InvalidSignature(SignatureError)
A crate::ident::Signature cannot be written as an author, committer or tagger line.
UnexpectedObjectKind
An object exists but has a different kind than the operation requires, such as a tree or blob where a commit was expected.
Fields
expected: ObjectKindThe kind the operation required.
actual: ObjectKindThe kind the object actually has.
CommitGraphParentMissing
A commit-graph write was given a commit whose parent is neither among the commits being written nor in the base graph layers, so its parent edge cannot be encoded.
Fields
DeltaChainTooDeep
In-pack delta resolution exceeded the read-side chain depth limit (guards against cyclic ref-delta chains and unbounded recursion; Git has no read limit).
UnknownObjectType(String)
An unsupported or unknown object type was encountered.
ObjectHeaderTooLong
Loose object header type field exceeds Git’s 32-byte limit.
Io(Error)
An I/O error from the underlying filesystem.
LockHeld
A lock file (for example .git/index.lock or refs/heads/main.lock) already exists, so
another process is updating the same file or a crashed one left the lock behind.
Operations that return this before changing anything leave the repository untouched.
The lock file belongs to whoever created it and is never removed. Retry once the other
process finishes, or delete path when no process owns it (a holder with
running: false means the lock is stale).
Fields
holder: Option<LockHolder>Owner recorded in the lock’s pid sidecar (core.lockfilePid), when one was written.
Zlib(String)
A zlib compression or decompression failure.
LooseHashMismatch
Loose object bytes hash to a different OID than the file path implies (git fsck / read_loose_object).
Fields
LooseObjectWrite
A prepared loose object could not be written during parallel index staging.
Fields
WorktreePathIo
Filesystem I/O failed on a repository-relative worktree path (checkout, staging, diff).
Fields
operation: WorktreePathOperationWhat the operation was trying to do when I/O failed.
GitDirPathIo
Filesystem I/O failed on a path under the repository git directory (objects, refs, logs, …).
Fields
operation: GitDirPathOperationWhat the operation was trying to do when I/O failed.
ObjectStreamTruncated
A streamed object write or hash ended before the declared size was read.
Fields
WorktreeFileChanged
A worktree file hashed earlier in an operation had different content when stored.
IndexError(String)
The index file is missing, truncated, or has a bad header.
IndexUnmerged
Stage-1/2/3 entries are present; a stage-0 tree cannot be built.
MaintenanceRunning
Another maintenance run holds the repository’s gc.pid lock
(crate::maintenance::GcLock); nothing was changed.
Fields
holder: GcLockHolderProcess recorded in gc.pid.
UnmergedConflictMarkers
Explicit crate::porcelain::add::stage refused paths that still contain conflict markers.
IndexPathPrefixConflict
A file path is a prefix of another index path at the same tree level.
Fields
IndexFsmonitorExtensionTruncated
The FSMN index extension ends before its header, token, or EWAH payload.
IndexFsmonitorExtensionBadVersion(u32)
The FSMN extension header version is not supported.
IndexFsmonitorExtensionEwahInvalid
The EWAH bitmap embedded in FSMN could not be decoded.
CacheTreeCorrupt
The cache-tree extension references more entries than the index contains. Git emits this
(verbatim, prefixed with error: ) when a tree with duplicate path entries is read into the
index (t4058-diff-duplicates).
InvalidRef(String)
A reference name or value is invalid.
PackedRefsUnexpectedLine
A packed-refs line Git would reject when reading the ref database.
PathError(String)
A general path-related error (invalid UTF-8, out-of-bounds, etc.).
PathspecFromFile(PathspecFromFileParseError)
--pathspec-from-file parse failure.
InvalidPath(String)
A tree/index path component is forbidden (.git, HFS/NTFS aliases, etc.).
InvalidPathComponent
A repository-relative path failed crate::path_validate rules while populating the index or checkout.
Fields
reason: PathComponentErrorWhich component rule failed.
Config(ConfigError)
A configuration file parsing or access error.
Branch(BranchError)
Branch create, delete, or upstream configuration failure.
RefLock(RefLockError)
Reference lock failure while updating refs.
RefStore(RefStoreError)
Reference store transaction or iteration failure.
Reftable(ReftableError)
Reftable file, stack, or transaction failure.
Filter(FilterError)
Filter or EOL conversion failure.
Apply(ApplyError)
Patch application failure.
DiffPath(DiffPathError)
Diff path selection failure.
PathOutsideRepo(PathOutsideRepoError)
Path resolves outside the repository.
Signing(String)
A commit/tag signing or signature-verification error.
Auth
HTTP authentication failed: the server required credentials (401) and
either no credential provider was wired, the provider could not supply a
usable username/password, the server demanded an unsupported auth scheme,
or the supplied credentials were rejected.
Distinct from Error::Message so embedders can detect an authentication
failure (and e.g. fall back to an interactive/subprocess path) rather than
string-matching, and so the failure surfaces typed instead of hanging.
Fields
url: StringRepository URL with credentials redacted and smart-HTTP endpoint suffixes
(/info/refs?service=…, /git-upload-pack, /git-receive-pack) removed.
reason: AuthFailureWhat went wrong.
PushOptionsUnsupported
A push carried --push-option values but the remote git-receive-pack
did not advertise the push-options capability, so the options cannot be
transmitted.
Distinct from Error::Message so embedders can detect this specific
negotiation failure (and e.g. fall back to a subprocess push) rather than
string-matching. The message matches Git’s
fatal: the receiving end does not support push options.
FetchUnshallowNotShallow
git fetch --unshallow on a repository that is not shallow.
FetchShallowUnsupported
A deepen/shallow fetch was requested but the remote did not advertise the
shallow capability.
FetchDeepenRelativeUnsupported
A --deepen fetch was requested but the remote did not advertise
deepen-relative.
BundleMissingPrerequisites
A bundle fetch or verify found prerequisite commits missing from history.
ReceivedPackTempMissing
Streaming fetch/clone temp pack disappeared before index-pack (often real-time antivirus).
InvalidAttrPathspec
A pathspec’s :(attr:...) magic is malformed.
Fields
reason: AttrPathspecErrorWhat is wrong with its attr clause.
PathspecNoMatch
A pathspec did not match any file known to Git (index or HEAD tree).
RestoreConflictWithStaged
crate::porcelain::restore::restore_paths conflict options were combined with --staged.
RestoreConflictWithSource
crate::porcelain::restore::restore_paths conflict options were combined with --source.
RestoreConflictMissingTheirs
A conflict side was missing from the index for the requested path.
RestoreConflictMissingOurs
A conflict side was missing from the index for the requested path.
RestoreConflictNotUnmerged
Three-way remerge needs stages 1, 2, and 3 in the index.
RestorePathUnmerged
crate::porcelain::restore::restore_paths was asked to restore the worktree from the
index for paths that still have conflict stages; pick a side or rebuild the markers instead.
Nothing is written when this is returned.
Fields
PathspecBeyondSymlink
A literal pathspec names a file under a symlink directory component.
PartialCommitDuringMerge
crate::porcelain::commit::CommitScope::Paths was used while a merge is in progress.
PathspecIgnored
Explicit crate::porcelain::add::stage pathspecs name paths excluded by ignore rules.
Fields
RemoveBlocked
crate::porcelain::paths::remove_paths refused paths whose removal would lose
content, because crate::porcelain::paths::RemoveOptions::force was not set.
Fields
paths: Vec<BlockedRemoval>Each refused path with the reason it was refused.
NotRemovingRecursively(String)
A directory pathspec was used without recursive (crate::porcelain::paths::remove_paths).
RequiresWorkTree
A porcelain path operation requires a checked-out work tree.
EmptyCommitMessage
A commit was requested with an empty message body after normalization.
RemovePathsRequired
crate::porcelain::paths::remove_paths was called with no pathspecs.
MoveSourceNotTracked
crate::porcelain::paths::move_path / crate::porcelain::paths::move_paths source is not tracked.
MoveDestinationExists
Move refused because the destination already exists without --force.
MoveIntoSubdirectory
Move refused because the destination lies under the source directory.
MoveIntoSelf
Move refused because source and destination are the same path.
MoveNothingToMove
Move refused because the source has no index entries.
MoveDuplicateDestination
Multi-source move would write more than one source to the same destination path.
MoveBadSource
A worktree source path is missing or not a file, directory, or symlink.
MoveMissingIndexEntry
Internal invariant: a planned rename references a missing index entry.
RemoteUnreadable
The remote could not be read or written: a missing repository, a failed connection, an HTTP error status, or no Git handshake.
Use Error::is_remote_unreadable to test for it through wrapper errors.
Not used for cancellation; see Error::is_cancelled.
Fields
url: Option<String>Remote URL or resolved local path, with credentials redacted. None when the
failing layer only had a connection, not the URL it was opened from.
reason: RemoteUnreadableReasonWhat went wrong.
FetchRefspec(FetchRefspecError)
Explicit fetch refspec resolution failed (missing or ambiguous source).
FetchNonFastForward
Fetch refused to overwrite a local branch with a non-fast-forward update.
FetchIntoCheckedOutBranch
Fetch refused to update the branch checked out in this or a linked worktree.
WouldOverwrite
Checkout or switch would overwrite local or untracked worktree content.
Fields
reason: OverwriteReasonWhether tracked local edits or untracked paths block the operation.
message: StringHuman-readable summary (depends on OverwriteReason).
DirtyWorktree
Staged or unstaged changes block an operation that needs a clean worktree.
Fields
operation: WorktreeOperationThe operation that was refused.
InvalidIdentity(CommitIdentityError)
Author or committer on crate::porcelain::commit::CommitRequest is invalid.
Cancelled
A long-running library operation stopped at a cancellation checkpoint.
Use Error::is_cancelled to test for it through wrapper errors
(crate::remote::RemoteError::is_cancelled, crate::remote::clone::CloneError::is_cancelled, …).
Identity(IdentityError)
No usable author or committer identity is configured
(crate::repo::Repository::identity).
Message(String)
User-facing message that should be printed verbatim (no extra prefix).
Used for revision errors that must match Git’s fatal: lines exactly.
NotFastForward
A merge was requested with fast-forward only, but the histories diverged.
NothingToCommit
The index tree matches the parent commit tree and allow_empty is false.
NothingStagedToCommit
No staged changes are available for a CommitScope::Staged
commit, but the work tree has unstaged or untracked paths.
Fields
DetachedHead
create_commit requires a branch checkout.
UnbornHead
HEAD is on a branch with no commits yet, but the operation needs a commit
(Repository::head_commit,
replay_commit).
InvalidHead
HEAD could not be resolved to a branch, detached commit, or unborn branch.
MergeCommit
replay_commit does not replay merge commits
until callers can select a mainline parent explicitly.
ReplaySourceAtHead
Cherry-pick source is already checked out as HEAD.
SequencerUnknownCommand
Sequencer todo lists a command grit does not implement yet.
ReplayAbortHeadMoved
abort_replay_sequence refuses when HEAD moved since the replay started.
ReplayContinueUnmerged
continue_replay_sequence refuses while unmerged index entries remain.
NoReplayInProgress
No cherry-pick or revert sequence is in progress.
OperationInProgress(InProgressOperation)
The command would move HEAD while a paused operation still depends on it
(see operation_blocking_switch).
BranchCheckedOutInWorktree
A local branch is checked out as HEAD in a linked or main worktree.
Fields
BranchNotFound
refs/heads/<branch> does not exist.
BranchListNamesDateSort
list_branches with BranchDetail::Names cannot use date sort.
CannotDeleteCurrentBranch
delete_branch refuses to delete the branch
HEAD points at.
BranchNotMerged
delete_branch without force found commits
on the branch that are not reachable from its upstream (or from HEAD when it has none).
TagNotFound
refs/tags/<tag> does not exist.
Tag(TagError)
Tag create/delete validation failure (crate::porcelain::tag::TagError).
Worktree(WorktreeError)
Linked worktree add/remove/move/lock/repair failure (crate::worktree::WorktreeError).
CorruptStash(&'static str)
Stash commit object has fewer parents or an invalid shape for apply/show.
StashNotFound
stash@{{n}} is out of range for the current stash reflog.
ReflogUnknownRef
Ref does not exist and has no reflog entries.
ReflogInvalidSelector
A reflog selector is missing its reference or @{n} delimiters.
ReflogInvalidIndex
A reflog selector index is not a nonnegative integer that fits in usize.
Fields
source: ParseIntErrorInteger parsing failure, including overflow.
ReflogIndexOutOfRange
ref@{{n}} is out of range for the current reflog.
StashNoInitialCommit
Pushing or creating a stash (crate::repo_handles::RepositoryStash::push) requires at least one commit.
StashBareRepository
Stash create/apply/pop requires a working tree (not a bare repository).
StashIndexConflict
crate::repo_handles::RepositoryStash::apply with restore_index could
not merge the current index with the stashed index parent.
StashOptionConflict(String)
Incompatible StashPushOptions flags.
HunkSelection(HunkSelectError)
Partial crate::repo_handles::RepositoryStash::push hunk selection failed.
StashMissingHead
HEAD does not resolve while applying a stash entry.
StashWouldOverwriteLocalChanges
Applying a stash would overwrite locally modified worktree content.
StashIndexWrite(String)
The index could not be written after a successful stash apply.
StashSymlinkNotUtf8
A symlink blob in a stash commit is not valid UTF-8.
StashCouldNotRestoreUntracked
Applying a stash with an untracked-files parent would replace an existing worktree path.
AmendUnborn
CommitRequest::amend was set on an unborn branch.
NoteAlreadyExists
RepositoryNotes::add was called without
force when a note already exists on the object.
InvalidNotesRef(String)
A configured or environment notes ref is not under refs/notes/.
NotesRefNotCommit
A notes ref resolves to an object that cannot hold notes (notes reads accept a commit or a tree; notes merges require a commit).
Fields
found: ObjectKindKind of object the ref resolved to.
NotesObjectKind
An object reached while reading a notes tree has the wrong kind (for example a note entry that is not a blob).
Fields
expected: ObjectKindKind the notes layout requires at this position.
found: ObjectKindKind actually stored.
NotesMergeBothEmpty
notes_merge_inner was asked to merge two notes refs
that both have no notes commit.
Fields
NotesMergeInProgress
A manual notes merge was started while an earlier one still has conflict files in the notes merge worktree.
Midx(MidxError)
Multi-pack-index load or write failure.
RevParse(RevParseError)
Revision parsing failed (crate::rev_parse_error::RevParseError).
RevList(RevListError)
Revision walking / rev-list option parsing failed (crate::rev_list_error::RevListError).
Hook(HookError)
A Git hook subprocess failed or could not be started.
History(HistoryError)
History rewrite planning failed (crate::history::HistoryError).
UnsupportedObjectStore
The operation needs the files-backed objects/ directory, but the repository’s
Odb uses a custom OdbBuilder::primary
store. Nothing was written; use a files-backed repository for this operation.
OdbObjectsDirMismatch
RepositoryBuilder::open was given an
OdbBuilder rooted somewhere other than the repository’s
objects/ directory.
Fields
TreeSha256InvalidHex
Parsing a crate::tree_sha256::TreeSha256 from hex failed (expected 64 hex digits).
TreeSha256InvalidRevision
A revision passed to crate::tree_sha256::tree_sha256 did not peel to a commit or tree.
Fields
found: ObjectKindObject kind after peeling annotated tags.
TreeSha256MissingSubmodules(Vec<MissingSubmodule>)
One or more submodules required for crate::tree_sha256::tree_sha256 are missing.
TreeSha256RequiresSigning
--tree-sha256 was requested with signing explicitly disabled.
TagVerifyNotTag
crate::tree_sha256::verify_tag was given an object that is not an annotated tag.
TagVerifyMissingObjectHeader
Annotated tag header block has no object line.
TagVerifyDuplicateTreeSha256Header
Annotated tag carries more than one tree-sha256 header line.
TreeSha256Claim(TreeSha256ClaimError)
Annotated tag tree-sha256 header parsing failed.
BlameIgnoreRevUnknown
grit blame --ignore-rev did not resolve to a commit.
BlameIgnoreRevsFileOpen
--ignore-revs-file could not be read.
BlameIgnoreRevsFileInvalidRev
A line in an ignore-revs file is not a full-length object id.
Implementations§
Source§impl Error
impl Error
Sourcepub fn dirty_worktree(operation: WorktreeOperation, paths: Vec<String>) -> Self
pub fn dirty_worktree(operation: WorktreeOperation, paths: Vec<String>) -> Self
Build Error::DirtyWorktree, sorting and deduplicating paths.
Sourcepub fn would_overwrite(reason: OverwriteReason, paths: Vec<String>) -> Self
pub fn would_overwrite(reason: OverwriteReason, paths: Vec<String>) -> Self
Build Error::WouldOverwrite for switch and similar tree transitions.
Sourcepub fn remote_unreadable(
url: impl Into<String>,
reason: RemoteUnreadableReason,
) -> Self
pub fn remote_unreadable( url: impl Into<String>, reason: RemoteUnreadableReason, ) -> Self
Build Error::RemoteUnreadable for url.
Sourcepub fn is_remote_unreadable(&self) -> bool
pub fn is_remote_unreadable(&self) -> bool
Whether this is Error::RemoteUnreadable: the remote could not be read or written
at all (as opposed to a rejected update or an empty remote).
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether this is Error::Cancelled or a nested history failure that was cancelled.
Sourcepub fn invalid_path_component(
path: impl Into<String>,
reason: PathComponentError,
) -> Self
pub fn invalid_path_component( path: impl Into<String>, reason: PathComponentError, ) -> Self
Build Error::InvalidPathComponent.
Sourcepub fn wants_fatal_prefix(&self) -> bool
pub fn wants_fatal_prefix(&self) -> bool
When set, the CLI should prefix stderr with fatal: for Git-compatible commands.
Sourcepub fn git_stderr_message(&self) -> String
pub fn git_stderr_message(&self) -> String
Format for Git-style stderr (adds fatal: / error: when appropriate).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<ApplyError> for Error
impl From<ApplyError> for Error
Source§fn from(source: ApplyError) -> Self
fn from(source: ApplyError) -> Self
Source§impl From<BranchError> for Error
impl From<BranchError> for Error
Source§fn from(source: BranchError) -> Self
fn from(source: BranchError) -> Self
Source§impl From<CommitIdentityError> for Error
impl From<CommitIdentityError> for Error
Source§fn from(source: CommitIdentityError) -> Self
fn from(source: CommitIdentityError) -> Self
Source§impl From<ConfigError> for Error
impl From<ConfigError> for Error
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Source§impl From<DiffPathError> for Error
impl From<DiffPathError> for Error
Source§fn from(source: DiffPathError) -> Self
fn from(source: DiffPathError) -> Self
Source§impl From<Error> for CommitPatchError
impl From<Error> for CommitPatchError
Source§impl From<Error> for HunkSelectError
impl From<Error> for HunkSelectError
Source§impl From<Error> for ContinueMergeError
impl From<Error> for ContinueMergeError
Source§impl From<Error> for CloneError
impl From<Error> for CloneError
Source§impl From<Error> for ResolveDiffArgumentsError
impl From<Error> for ResolveDiffArgumentsError
Source§impl From<Error> for PartialCloneError
impl From<Error> for PartialCloneError
Source§impl From<Error> for BitmapWalkError
impl From<Error> for BitmapWalkError
Source§impl From<Error> for HistoryError
impl From<Error> for HistoryError
Source§fn from(err: Error) -> Self
fn from(err: Error) -> Self
Unwraps Error::History back to the history failure it carries; every other library
error becomes HistoryError::Library.
Source§impl From<Error> for RebaseSessionError
impl From<Error> for RebaseSessionError
Source§impl From<Error> for CompactError
impl From<Error> for CompactError
Source§impl From<Error> for RefQueryError
impl From<Error> for RefQueryError
Source§impl From<Error> for RemoteError
impl From<Error> for RemoteError
Source§impl From<Error> for UnpackError
impl From<Error> for UnpackError
Source§impl From<Error> for ServeError
impl From<Error> for ServeError
Source§impl From<FetchRefspecError> for Error
impl From<FetchRefspecError> for Error
Source§fn from(source: FetchRefspecError) -> Self
fn from(source: FetchRefspecError) -> Self
Source§impl From<FilterError> for Error
impl From<FilterError> for Error
Source§fn from(source: FilterError) -> Self
fn from(source: FilterError) -> Self
Source§impl From<HistoryError> for Error
impl From<HistoryError> for Error
Source§fn from(source: HistoryError) -> Self
fn from(source: HistoryError) -> Self
Source§impl From<HunkSelectError> for Error
impl From<HunkSelectError> for Error
Source§fn from(source: HunkSelectError) -> Self
fn from(source: HunkSelectError) -> Self
Source§impl From<IdentityError> for Error
impl From<IdentityError> for Error
Source§fn from(source: IdentityError) -> Self
fn from(source: IdentityError) -> Self
Source§impl From<LockError> for Error
impl From<LockError> for Error
Source§fn from(err: LockError) -> Self
fn from(err: LockError) -> Self
LockError::Held becomes Error::LockHeld with the
recorded LockHolder, and I/O failures become Error::Io.