From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25945 invoked by alias); 19 Oct 2011 10:37:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16520 Received: (qmail 20411 invoked from network); 19 Oct 2011 10:37:11 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type; bh=O53+lraSX1nxaPASx6dXIESexF0/8cJBu5LeZmAjVAU=; b=V9SuZ1k5+jSAOzDpuPr97kPjZufgTAS6vE2PtyNw1LwVQjRw0im6nCGqKjxqnCC39H euttx87OhyYWSxAKtrH2pvgOb1KLyKc+DtydMyH+6cGk20yeT1VOnWLK+NRv6vrd2986 DplmyeVqCn8X9IcZ7XXOus8d9lJEhD4kikLbQ= Date: Wed, 19 Oct 2011 03:36:59 -0700 From: "Suraj N. Kurapati" To: zsh-users@zsh.org Subject: [PATCH] Misc/vcs_info-examples - avoid showing remote branch Message-ID: <20111019033659.7718667e@gmail.com> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/YFCjKjiDPHM/gEXq_Y/P+uY"; protocol="application/pgp-signature" --Sig_/YFCjKjiDPHM/gEXq_Y/P+uY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, This is a patch for Misc/vcs_info-examples from the ZSH git repo: http://zsh.git.sourceforge.net/git/gitweb.cgi?p=3Dzsh/zsh;a=3Dblob;f=3DMisc= /vcs_info-examples It prevents the display of remote branch if the remote branch has the same name as the local branch (minus the remote, of course). Cheers. --- gitweb.cgi.txt.old 2011-10-19 03:13:31.467973933 -0700 +++ gitweb.cgi.txt 2011-10-19 03:14:05.502458051 -0700 @@ -205,7 +205,7 @@ remote=3D${$(git rev-parse --verify ${hook_com[branch]}@{upstream} \ --symbolic-full-name 2>/dev/null)/refs\/remotes\/} - if [[ -n ${remote} ]] ; then + if [[ -n ${remote} && ${remote#*/} !=3D ${hook_com[branch]} ]] ; then hook_com[branch]=3D"${hook_com[branch]} [${remote}]" fi } --=20 If a listener nods his head when you're explaining your program, wake him up. --Sig_/YFCjKjiDPHM/gEXq_Y/P+uY Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6eqEsACgkQmV9O7RYnKMdPFwCfQASvRaP4LN1OYXkMic4LLI0i Av0An0hkdaYLUScvn9cV+LgUd/4P8NAA =OzNa -----END PGP SIGNATURE----- --Sig_/YFCjKjiDPHM/gEXq_Y/P+uY--