From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21742 invoked by alias); 19 Oct 2011 17:29:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29827 Received: (qmail 10630 invoked from network); 19 Oct 2011 17:29:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-workers@zsh.org Cc: "Suraj N. Kurapati" Subject: Re: [PATCH] Misc/vcs_info-examples - avoid showing remote branch In-Reply-To: <87vcrli5tf.fsf@ft.bewatermyfriend.org> (Frank Terbeck's message of "Wed, 19 Oct 2011 13:22:52 +0200") References: <20111019033659.7718667e@gmail.com> <87vcrli5tf.fsf@ft.bewatermyfriend.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Date: Wed, 19 Oct 2011 19:08:26 +0200 Message-ID: <87aa8wj4dx.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Df-Sender: NDMwNDQ0 [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 }