forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.09.3 MiB0d793e7Tahinli1 hour ago359 commits

error.rs23 lines, 676 bytesHistoryRawDownload
1#[derive(Debug, thiserror::Error)]
2pub enum Error {
3 #[error("io error: {0}")]
4 Io(#[from] std::io::Error),
5 #[error("git binary unusable: {0}")]
6 Unavailable(String),
7 #[error("git {found} is older than required {required}")]
8 TooOld { found: String, required: String },
9 #[error("invalid revision or path: {0}")]
10 InvalidInput(String),
11 #[error("git command failed: {0}")]
12 Failed(String),
13 #[error("ref moved since it was read: {0}")]
14 RefMoved(String),
15}
16
17pub type Result<T> = std::result::Result<T, Error>;
18
19impl From<Error> for forge_core::Error {
20 fn from(e: Error) -> Self {
21 forge_core::Error::Git(e.to_string())
22 }
23}