aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash13
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 8867e092b..396c8e98f 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -651,17 +651,14 @@ __git_refs2 ()
# __git_refs_remotes requires 1 argument (to pass to ls-remote)
__git_refs_remotes ()
{
- local cmd i is_hash=y
- for i in $(git ls-remote "$1" 2>/dev/null); do
- case "$is_hash,$i" in
- n,refs/heads/*)
+ local i is_hash=y
+ for i in $(git ls-remote "$1" 'refs/heads/*' 2>/dev/null); do
+ case "$is_hash" in
+ n)
is_hash=y
echo "$i:refs/remotes/$1/${i#refs/heads/}"
;;
- y,*) is_hash=n ;;
- n,*^{}) is_hash=y ;;
- n,refs/tags/*) is_hash=y;;
- n,*) is_hash=y; ;;
+ y) is_hash=n ;;
esac
done
}