aboutsummaryrefslogtreecommitdiff
path: root/src/vcs.rs
diff options
context:
space:
mode:
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());