summaryrefslogtreecommitdiffstats
path: root/src/git.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/git.rs')
-rw-r--r--src/git.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/git.rs b/src/git.rs
index 0f59c69..35b3dbf 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -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),
));
}