1
0
mirror of https://github.com/git/git.git synced 2024-10-22 05:18:11 +02:00

Merge branch 'fc/completion-less-ls-remote'

* fc/completion-less-ls-remote:
  completion: avoid ls-remote in certain scenarios
This commit is contained in:
Junio C Hamano 2013-06-11 13:30:16 -07:00
commit a62d73e7c6

@ -371,14 +371,8 @@ __git_refs ()
done done
;; ;;
*) *)
git ls-remote "$dir" HEAD ORIG_HEAD 'refs/tags/*' 'refs/heads/*' 'refs/remotes/*' 2>/dev/null | \ echo "HEAD"
while read -r hash i; do git for-each-ref --format="%(refname:short)" -- "refs/remotes/$dir/" | sed -e "s#^$dir/##"
case "$i" in
*^{}) ;;
refs/*) echo "${i#refs/*/}" ;;
*) echo "$i" ;;
esac
done
;; ;;
esac esac
} }