From d92c7ca64023f6d321a4938e3d47a4ce6b489105 Mon Sep 17 00:00:00 2001 From: NerdyPepper Date: Tue, 21 May 2019 19:36:05 +0530 Subject: quick fix vcs issues on empty repos --- src/vcs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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)> branch = format!("{:.6}", id).color(commit_color); } - let mut repo_stat = "".white(); let git_clean_color = env::var("GIT_CLEAN_COLOR").unwrap_or("green".into()); let git_wt_modified_color = env::var("GIT_WT_MODIFIED_COLOR").unwrap_or("red".into()); let git_index_modified_color = env::var("GIT_INDEX_MODIFIED_COLOR").unwrap_or("yellow".into()); + let stat_char = env::var("GIT_CLEAN").unwrap_or("ยท".into()); + let mut repo_stat = stat_char.color(&git_clean_color[..]); let file_stats = repo.statuses(None).unwrap(); for file in file_stats.iter() { -- cgit v1.2.3