aboutsummaryrefslogtreecommitdiff
path: root/src/vcs.rs
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2019-05-21 15:06:05 +0100
committerNerdyPepper <[email protected]>2019-05-21 15:06:05 +0100
commitd92c7ca64023f6d321a4938e3d47a4ce6b489105 (patch)
tree9f0fb613cdd50581d31f9fbb0030e88a7155609b /src/vcs.rs
parent48483df9b86194bd431f62bdee7bebcd9364a4e6 (diff)
quick fix vcs issues on empty repos
Diffstat (limited to 'src/vcs.rs')
-rw-r--r--src/vcs.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vcs.rs b/src/vcs.rs
index 87c5517..8d493de 100644
--- a/src/vcs.rs
+++ b/src/vcs.rs
@@ -38,10 +38,11 @@ pub fn vcs_status() -> Option<(colored::ColoredString, colored::ColoredString)>
38 branch = format!("{:.6}", id).color(commit_color); 38 branch = format!("{:.6}", id).color(commit_color);
39 } 39 }
40 40
41 let mut repo_stat = "".white();
42 let git_clean_color = env::var("GIT_CLEAN_COLOR").unwrap_or("green".into()); 41 let git_clean_color = env::var("GIT_CLEAN_COLOR").unwrap_or("green".into());
43 let git_wt_modified_color = env::var("GIT_WT_MODIFIED_COLOR").unwrap_or("red".into()); 42 let git_wt_modified_color = env::var("GIT_WT_MODIFIED_COLOR").unwrap_or("red".into());
44 let git_index_modified_color = env::var("GIT_INDEX_MODIFIED_COLOR").unwrap_or("yellow".into()); 43 let git_index_modified_color = env::var("GIT_INDEX_MODIFIED_COLOR").unwrap_or("yellow".into());
44 let stat_char = env::var("GIT_CLEAN").unwrap_or("ยท".into());
45 let mut repo_stat = stat_char.color(&git_clean_color[..]);
45 46
46 let file_stats = repo.statuses(None).unwrap(); 47 let file_stats = repo.statuses(None).unwrap();
47 for file in file_stats.iter() { 48 for file in file_stats.iter() {