Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Misc/vcs_info-examples - avoid showing remote branch
- X-seq: zsh-users 16520
- From: "Suraj N. Kurapati" <sunaku@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: [PATCH] Misc/vcs_info-examples - avoid showing remote branch
- Date: Wed, 19 Oct 2011 03:36:59 -0700
- 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=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello,
This is a patch for Misc/vcs_info-examples from the ZSH git repo:
http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob;f=Misc/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=${$(git rev-parse --verify ${hook_com[branch]}@{upstream} \
--symbolic-full-name 2>/dev/null)/refs\/remotes\/}
- if [[ -n ${remote} ]] ; then
+ if [[ -n ${remote} && ${remote#*/} != ${hook_com[branch]} ]] ; then
hook_com[branch]="${hook_com[branch]} [${remote}]"
fi
}
--
If a listener nods his head when you're explaining your program, wake
him up.
Attachment:
signature.asc
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author