diff options
-rw-r--r-- | src/git.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -19,9 +19,12 @@ pub fn crawl_git_tree<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> { .output()?; if !output.status.success() { + let errstr = String::from_utf8(output.stderr) + .unwrap_or_else(|_| String::from("<could not format git error output as UTF8>")); + return Err(io::Error::new( io::ErrorKind::Other, - "git ls-tree did not run successfully", + format!("git ls-tree did not run successfully: {}", errstr), )); } |