aboutsummaryrefslogtreecommitdiff
path: root/src/vcs.rs
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2019-05-21 18:18:53 +0100
committerNerdyPepper <[email protected]>2019-05-21 18:18:53 +0100
commit9f2f8e150ef38745581c090ff213589b292b60f4 (patch)
treee4de694a5278acf32bdeda1d21707b3d9998c7d9 /src/vcs.rs
parent78230815814ee4f4e8af4c1ad72b83b1ede242d0 (diff)
ew colors are not fun
Diffstat (limited to 'src/vcs.rs')
-rw-r--r--src/vcs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vcs.rs b/src/vcs.rs
index 5201886..5cdce31 100644
--- a/src/vcs.rs
+++ b/src/vcs.rs
@@ -42,11 +42,11 @@ pub fn vcs_status() -> Option<(colored::ColoredString, colored::ColoredString)>
42 let commit_color = env::var("COMMIT_COLOR").unwrap_or("bright black".into()); 42 let commit_color = env::var("COMMIT_COLOR").unwrap_or("bright black".into());
43 43
44 if reference.is_branch() { 44 if reference.is_branch() {
45 branch = format!("{}", reference.shorthand().unwrap()).color(branch_color); 45 branch = format!("{}{}", reference.shorthand().unwrap(), commit_dist).color(branch_color);
46 } else { 46 } else {
47 let commit = reference.peel_to_commit().unwrap(); 47 let commit = reference.peel_to_commit().unwrap();
48 let id = commit.id(); 48 let id = commit.id();
49 branch = format!("{:.6}", id).color(commit_color); 49 branch = format!("{:.6}{}", id, commit_dist).color(commit_color);
50 } 50 }
51 51
52 let git_clean_color = env::var("GIT_CLEAN_COLOR").unwrap_or("green".into()); 52 let git_clean_color = env::var("GIT_CLEAN_COLOR").unwrap_or("green".into());