diff options
Diffstat (limited to 'src/git.rs')
| -rw-r--r-- | src/git.rs | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -34,10 +34,7 @@ fn git_ok(cwd: Option<&Path>, args: &[&str]) -> bool { pub fn ls_remote_head(url: &str) -> Result<Option<String>> { match git(None, &["ls-remote", url, "HEAD"]) { - Ok(out) => { - let sha = out.split_whitespace().next().filter(|s| s.len() >= 7).map(std::string::ToString::to_string); - Ok(sha) - } + Ok(out) => Ok(out.split_whitespace().next().filter(|s| s.len() >= 7).map(std::string::ToString::to_string)), Err(e) if is_missing_remote(&e) => Ok(None), Err(e) => Err(e), } |
