Filter the HEAD symbolic reference.
This commit is contained in:
parent
9ad18fe7a7
commit
f430bd75c6
|
@ -18,9 +18,10 @@ case "$state" in
|
||||||
(branch)
|
(branch)
|
||||||
remote="$words[(($CURRENT - 1))]"
|
remote="$words[(($CURRENT - 1))]"
|
||||||
branches=($(
|
branches=($(
|
||||||
git branch -a \
|
git branch -r \
|
||||||
| grep "remotes/${remote}" \
|
| sed \
|
||||||
| sed -e 's/[ \*]*//g' -e "s:remotes/${remote}/::g"
|
-e "/${remote}\/HEAD -> ${remote}/d" \
|
||||||
|
-e "s/^[[:space:]]*${remote}\///g"
|
||||||
))
|
))
|
||||||
_describe -t branch 'branches' branches && ret=0
|
_describe -t branch 'branches' branches && ret=0
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -8,9 +8,7 @@ url=$(
|
||||||
| sed -En "s/remote.${remote}.url=(git|https?)(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/https:\/\/github.com\/\4\/\5/p"
|
| sed -En "s/remote.${remote}.url=(git|https?)(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/https:\/\/github.com\/\4\/\5/p"
|
||||||
)
|
)
|
||||||
branches=($(
|
branches=($(
|
||||||
git branch -a \
|
git branch -r | sed -e "/${remote}\/HEAD -> ${remote}/d" -e "s/^[[:space:]]*${remote}\///g"
|
||||||
| grep "remotes/${remote}" \
|
|
||||||
| sed -e 's/[ \*]*//g' -e "s:remotes/${remote}/::g"
|
|
||||||
))
|
))
|
||||||
current_branch="$(git-branch)"
|
current_branch="$(git-branch)"
|
||||||
branch="${2:-master}"
|
branch="${2:-master}"
|
||||||
|
|
Loading…
Reference in a new issue