pub enum GitError {
NotAGitRepository(String),
NotOnABranch,
NoRemoteForBranch(String),
DirtyWorkingTree,
ConfigLoadingFailed,
FetchFailed,
MergeConflict,
FailedSettingHead(String),
}Expand description
A custom error describing the error cases for the GitCheck.
Variants§
NotAGitRepository(String)
The directory is not a valid git repository.
NotOnABranch
There is no branch in the repository currently. It can be a repository without any branch, or checked out on a commit.
NoRemoteForBranch(String)
There is no remote for the current branch. This usually because the branch hasn’t been pulled.
DirtyWorkingTree
There are changes in the directory, avoiding pulling. This is a safety mechanism to avoid pulling over local changes, to not overwrite anything important.
ConfigLoadingFailed
Cannot load the git config
FetchFailed
Cannot fetch the current branch. This is possibly a network failure.
MergeConflict
Cannot pull updates to the current branch. This means either the merge analysis failed or there is a merge conflict.
FailedSettingHead(String)
Cannot set the HEAD to the fetch commit.
Trait Implementations§
source§impl Error for GitError
impl Error for GitError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl RefUnwindSafe for GitError
impl Send for GitError
impl Sync for GitError
impl Unpin for GitError
impl UnwindSafe for GitError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more