aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vcs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vcs.rs b/src/vcs.rs
index 5bc194d..26edf81 100644
--- a/src/vcs.rs
+++ b/src/vcs.rs
@@ -21,7 +21,10 @@ pub fn vcs_status() -> Option<(colored::ColoredString, colored::ColoredString)>
21 return None 21 return None
22 } 22 }
23 let repo = repo.unwrap(); 23 let repo = repo.unwrap();
24 let reference = repo.head().unwrap(); 24 let reference = match repo.head() {
25 Ok(r) => r,
26 Err(_) => return None
27 };
25 let mut branch; 28 let mut branch;
26 29
27 if reference.is_branch() { 30 if reference.is_branch() {