1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
pub type Result<T> = core::result::Result<T, Error>;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("unable to open repo: {0}")]
    UnableToOpenRepo(String),

    #[error("no remote found")]
    NoFetchRemoteFound,

    #[error("remote connect: {0}")]
    Connect(String),

    #[error("prepare: {0}")]
    Prepare(String),

    #[error("receive: {0}")]
    Receive(String),

    #[error("lock")]
    Lock,

    #[cfg(test)]
    #[error("expected failure in test")]
    TestFailureExpected,

    #[cfg(test)]
    #[error("test")]
    TestResult(#[from] Box<dyn std::error::Error>),
}