zsh-workers
 help / color / mirror / code / Atom feed
* Re: [PATCH] Misc/vcs_info-examples - avoid showing remote branch
       [not found] ` <87vcrli5tf.fsf@ft.bewatermyfriend.org>
@ 2011-10-19 17:08   ` Frank Terbeck
  2011-10-19 17:46     ` Frank Terbeck
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Terbeck @ 2011-10-19 17:08 UTC (permalink / raw)
  To: zsh-workers; +Cc: Suraj N. Kurapati

[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
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Misc/vcs_info-examples - avoid showing remote branch
  2011-10-19 17:08   ` [PATCH] Misc/vcs_info-examples - avoid showing remote branch Frank Terbeck
@ 2011-10-19 17:46     ` Frank Terbeck
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Terbeck @ 2011-10-19 17:46 UTC (permalink / raw)
  To: zsh-workers; +Cc: Suraj N. Kurapati

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
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-19 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20111019033659.7718667e@gmail.com>
     [not found] ` <87vcrli5tf.fsf@ft.bewatermyfriend.org>
2011-10-19 17:08   ` [PATCH] Misc/vcs_info-examples - avoid showing remote branch Frank Terbeck
2011-10-19 17:46     ` Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).