1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use thiserror::Error; #[derive(Debug, Error)] pub enum GitError { #[error("Unable to access current working directory")] WorkingDirectoryInaccessible, #[error("Unable to execute git process")] Execution, #[error("Unable to decode error from git executable")] Undecodable, #[error("git URL is invalid")] InvalidUrl, #[error("Ref name is invalid")] InvalidRefName, #[error("git failed with the following message: {0}")] GitError(String), }