diff options
author | NerdyPepper <[email protected]> | 2019-05-21 15:06:05 +0100 |
---|---|---|
committer | NerdyPepper <[email protected]> | 2019-05-21 15:06:05 +0100 |
commit | d92c7ca64023f6d321a4938e3d47a4ce6b489105 (patch) | |
tree | 9f0fb613cdd50581d31f9fbb0030e88a7155609b /src/vcs.rs | |
parent | 48483df9b86194bd431f62bdee7bebcd9364a4e6 (diff) |
quick fix vcs issues on empty repos
Diffstat (limited to 'src/vcs.rs')
-rw-r--r-- | src/vcs.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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() { |