commando 1.1.0

An interactive CLI tool to help you write conventional commit messages with ease.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt;

#[derive(Debug, Clone, PartialEq)]
pub enum GitError {
    NotAGitRepository,
    ExecutionFailed(String),
}

impl fmt::Display for GitError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            GitError::NotAGitRepository => write!(f, "Not a git repository"),
            GitError::ExecutionFailed(msg) => write!(f, "Git execution failed: {}", msg),
        }
    }
}

impl std::error::Error for GitError {}