Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Misc/vcs_info-examples - avoid showing remote branch



Frank Terbeck wrote:
[...]
> +    #if [[ -n ${remote} && ${remote#*/} !=3D ${hook_com[branch]} ]] ; then

Mikael on IRC caught the stray "3D"... So:


 Misc/vcs_info-examples |    4 ++++
 1 file changed, 4 insertions(+)


Index: Misc/vcs_info-examples
===================================================================
RCS file: /cvsroot/zsh/zsh/Misc/vcs_info-examples,v
retrieving revision 1.6
diff -u -p -r1.6 vcs_info-examples
--- Misc/vcs_info-examples	1 Jun 2011 21:21:04 -0000	1.6
+++ Misc/vcs_info-examples	19 Oct 2011 17:44:49 -0000
@@ -205,7 +205,11 @@ function +vi-git-remotebranch() {
     remote=${$(git rev-parse --verify ${hook_com[branch]}@{upstream} \
         --symbolic-full-name 2>/dev/null)/refs/remotes/}
 
+    # The first test will show a tracking branch whenever there is one. The
+    # second test, however, will only show the remote branch's name if it
+    # differs from the local one.
     if [[ -n ${remote} ]] ; then
+    #if [[ -n ${remote} && ${remote#*/} != ${hook_com[branch]} ]] ; then
         hook_com[branch]="${hook_com[branch]} [${remote}]"
     fi
 }



Messages sorted by: Reverse Date, Date, Thread, Author