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