pub enum GitError {
Show 19 variants
Open {
path: PathBuf,
source: Error,
},
Tags(Error),
Resolve {
revision: String,
source: Error,
},
Reference {
name: String,
source: Error,
},
Ancestry {
ancestor: String,
descendant: String,
source: Error,
},
Diff {
from: Option<String>,
to: String,
paths: Vec<PathBuf>,
source: Error,
},
History {
from: Option<String>,
to: String,
paths: Vec<PathBuf>,
source: Error,
},
Remote {
name: String,
source: Error,
},
Fetch {
remote: String,
refspec: String,
source: Error,
},
WorktreeAdd {
path: PathBuf,
source: Error,
},
WorktreeRemove {
path: PathBuf,
source: Error,
},
WorktreeRemoveFailed {
path: PathBuf,
prune: Error,
branch: Error,
},
Stage {
worktree: PathBuf,
source: Error,
},
Commit {
worktree: PathBuf,
source: Error,
},
Tag {
tag: String,
source: Error,
},
List {
remote: String,
source: Error,
},
StaleLease {
reference: String,
expected: Option<String>,
actual: Option<String>,
},
Push {
reference: String,
source: Error,
},
Rejected {
reference: String,
status: String,
},
}Expand description
A Git query or mutation failure.
Variants§
Open
The directory is not a Git repository or worktree libgit2 can open.
Tags(Error)
The tag names could not be read.
Resolve
A revision expression does not name a commit.
Reference
A reference exists but cannot be read or peeled to a commit.
Ancestry
The ancestry of two commits could not be read.
Fields
Diff
Two commits could not be compared.
Fields
History
The commits between two revisions could not be listed.
Fields
Remote
The named remote is not configured.
Fetch
A fetch failed.
Fields
WorktreeAdd
A disposable worktree could not be created.
WorktreeRemove
A disposable worktree could not be removed.
WorktreeRemoveFailed
The worktree could not be pruned and its branch could not be deleted.
Fields
Stage
Worktree changes could not be staged.
Commit
The staged changes could not be committed.
Tag
An annotated tag could not be created.
List
The remote reference heads could not be listed.
StaleLease
The remote branch moved away from the head the push expected.
Fields
Push
The push could not be sent.
Rejected
The remote refused a reference update.
Trait Implementations§
Source§impl Error for GitError
impl Error for GitError
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()