diff options
Diffstat (limited to 'src/git.rs')
| -rw-r--r-- | src/git.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) } |
