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

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



[moved to -workers]

The patch doesn't quite apply, since it's against `gitweb.cgi.txt'. But
since it is only one line, that's not critical.

I'll actually commit the following. Since vcs_info-examples is only a
file full of - well - examples, it makes sense to have both ways
presented to the user. FWIW, I can see users want either way.

Regards, Frank


 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:01:53 -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#*/} !=3D ${hook_com[branch]} ]] ; then
         hook_com[branch]="${hook_com[branch]} [${remote}]"
     fi
 }



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