summaryrefslogtreecommitdiffstats
path: root/src/git.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/git.rs')
-rw-r--r--src/git.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/git.rs b/src/git.rs
index 16c5ce4..a0e6489 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
use std::path::Path;
use std::process::{Command, Output, Stdio};
-use crate::error::{Error, Result};
+use crate::error::{Error, Missing, Result};
pub fn git(cwd: Option<&Path>, args: &[&str]) -> Result<String> {
let mut cmd = Command::new("git");
@@ -140,7 +140,7 @@ pub fn read_blob(mirror: &Path, commit: &str, path: &str) -> Result<Vec<u8>> {
.output()
.map_err(|e| Error::git(e.to_string()))?;
if !out.status.success() {
- return Err(Error::not_found(format!("{spec} not in mirror")));
+ return Err(Error::not_found(Missing::MirrorPath(spec)));
}
Ok(out.stdout)
}