summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-11 20:30:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-11 20:30:16 (GMT)
commita62d73e7c6fff96ea7fb2133b3e127a4a4bda957 (patch)
treec7d0217b0f91d287a6e268cb1d429a4fad7f2dfa /contrib/completion
parent9845bbba972c0299ae6d74c3e85dafba8372b6b4 (diff)
parente832f5c0968031d687706c97464be21f2da7be21 (diff)
downloadgit-a62d73e7c6fff96ea7fb2133b3e127a4a4bda957.zip
git-a62d73e7c6fff96ea7fb2133b3e127a4a4bda957.tar.gz
git-a62d73e7c6fff96ea7fb2133b3e127a4a4bda957.tar.bz2
Merge branch 'fc/completion-less-ls-remote'
* fc/completion-less-ls-remote: completion: avoid ls-remote in certain scenarios
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash10
1 files changed, 2 insertions, 8 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 91234d4..56c52c6 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -371,14 +371,8 @@ __git_refs ()
done
;;
*)
- git ls-remote "$dir" HEAD ORIG_HEAD 'refs/tags/*' 'refs/heads/*' 'refs/remotes/*' 2>/dev/null | \
- while read -r hash i; do
- case "$i" in
- *^{}) ;;
- refs/*) echo "${i#refs/*/}" ;;
- *) echo "$i" ;;
- esac
- done
+ echo "HEAD"
+ git for-each-ref --format="%(refname:short)" -- "refs/remotes/$dir/" | sed -e "s#^$dir/##"
;;
esac
}