mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
Suraj N. Kurapati: vcs_info-examples: Mention different ways to handle remote branch names in `vi-git-remotebranch()'.
This commit is contained in:
parent
7d9c12334b
commit
8ce9c1cbe7
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-10-19 Frank Terbeck <ft@bewatermyfriend.org>
|
||||
|
||||
* Suraj N. Kurapati: 29828: Misc/vcs_info-examples: Mention
|
||||
different ways to handle remote branch names in
|
||||
`vi-git-remotebranch()'.
|
||||
|
||||
2011-10-17 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* unposted: NEWS, README, Config/version.mk, Etc/.distfiles,
|
||||
|
@ -15470,5 +15476,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5478 $
|
||||
* $Revision: 1.5479 $
|
||||
*****************************************************
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue