summaryrefslogtreecommitdiff
path: root/t/t5515/fetch.br-config-glob_config-glob
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder@ira.uka.de>2011-10-08 16:54:43 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-10-21 14:38:23 -0700
commit6486ca6d77eaf4109b26b70da0b3a0158868e22f (patch)
treecdaec81f781f5ee251953ab8147ff5d67a4b5591 /t/t5515/fetch.br-config-glob_config-glob
parentcompletion: fast initial completion for config 'remote.*.fetch' value (diff)
downloadtgif-6486ca6d77eaf4109b26b70da0b3a0158868e22f.tar.xz
completion: remove broken dead code from __git_heads() and __git_tags()
__git_heads() was introduced in 5de40f5 (Teach bash about git-repo-config., 2006-11-27), and __git_tags() in 88e21dc (Teach bash about completing arguments for git-tag, 2007-08-31). As their name suggests, __git_heads() is supposed to list only branches, and __git_tags() only tags. Since their introduction both of these functions consist of two distinct parts. The first part gets branches or tags, respectively, from a local repositoty using 'git for-each-ref'. The second part queries a remote repository given as argument using 'git ls-remote'. These remote-querying parts are broken in both functions since their introduction, because they list both branches and tags from the remote repository. (The 'git ls-remote' query is not limited to list only heads or tags, respectively, and the for loop filtering the query results prints everything except dereferenced tags.) This breakage could be easily fixed by passing the '--heads' or '--tags' options or appropriate refs patterns to the 'git ls-remote' invocations. However, that no one noticed this breakage yet is probably not a coincidence: neither of these two functions were used to query a remote repository, the remote-querying parts were dead code already upon thier introduction and remained dead ever since. Since those parts of code are broken, are and were never used, stop the bit-rotting and remove them. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/fetch.br-config-glob_config-glob')
0 files changed, 0 insertions, 0 deletions