Code

completion: query only refs/heads/ in __git_refs_remotes()
authorSZEDER Gábor <szeder@ira.uka.de>
Sat, 8 Oct 2011 14:54:40 +0000 (16:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Oct 2011 21:38:23 +0000 (14:38 -0700)
commitd79bcf2cf21ddb8c3fcbd95bafa431f872d47a96
treebe97a707136efaa90e99bb94b1f62aea96ae5cb2
parentfb772cca2bd38e97a3b23d5b241a8961156b681b
completion: query only refs/heads/ in __git_refs_remotes()

__git_refs_remotes() is used to provide completion for refspecs to set
'remote.*.fetch' config variables for branches on the given remote.
So it's really only interested in refs under 'refs/heads/', but it
queries the remote for all its refs and then filters out all refs
outside of 'refs/heads/'.

Let 'git ls-remote' do the filtering.

Also remove the unused $cmd variable from __git_refs_remotes().

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash