git-cleaner 0.1.0

Bulk cleanup of git worktrees and merged branches across multiple repositories
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("git error in {path}: {source}")]
    Git { path: PathBuf, source: git2::Error },

    #[error("io error: {0}")]
    Io(#[from] std::io::Error),

    #[error("target directory does not exist: {0}")]
    TargetNotFound(PathBuf),

    #[error("not a git repository: {0}")]
    NotRepo(PathBuf),
}

pub type Result<T> = std::result::Result<T, Error>;