Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Misc/vcs_info-examples - avoid showing remote branch
- X-seq: zsh-workers 29828
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Misc/vcs_info-examples - avoid showing remote branch
- Date: Wed, 19 Oct 2011 19:46:14 +0200
- Cc: "Suraj N. Kurapati" <sunaku@xxxxxxxxx>
- In-reply-to: <87aa8wj4dx.fsf@ft.bewatermyfriend.org> (Frank Terbeck's message of "Wed, 19 Oct 2011 19:08:26 +0200")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20111019033659.7718667e@gmail.com> <87vcrli5tf.fsf@ft.bewatermyfriend.org> <87aa8wj4dx.fsf@ft.bewatermyfriend.org>
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
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author