01e355fb1e5dc3982efeecee699a96254f3f44e6

Author
Michele Bologna <michele.bologna@gmail.com>
Committer
Michele Bologna <michele.bologna@gmail.com>
Date

Message

In addition to the already existing variables ZSH_THEME_GIT_PROMPT for behind,
ahead and diverged remote, I added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE.

Diff

 1diff --git a/lib/git.zsh b/lib/git.zsh
 2index caa7e632913251f9694b3a3b7cb357e2879e02cf..baf86371724d01ae842bbfe6d4f8e39530caf208 100644
 3--- a/lib/git.zsh
 4+++ b/lib/git.zsh
 5@@ -36,7 +36,10 @@ git_remote_status() {
 6         ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
 7         behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
 8 
 9-        if [ $ahead -gt 0 ] && [ $behind -eq 0 ]
10+        if [ $ahead -eq 0 ] && [ $behind -eq 0 ]
11+        then
12+          echo "$ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE"
13+        elif [ $ahead -gt 0 ] && [ $behind -eq 0 ]
14         then
15             git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
16             git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"