author | SZEDER Gábor <szeder@ira.uka.de> | |
Sat, 8 Oct 2011 14:54:37 +0000 (16:54 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Oct 2011 21:38:23 +0000 (14:38 -0700) | ||
commit | abf05987de7b61972e85392ca2f1a4fc25046e57 | |
tree | ba2f406ef3fbab0e1257c9c847a7d07561ec5ec0 | tree | snapshot |
parent | a31e62629a1408bca540f505f2dc4ab8a9999f5d | commit | diff |
completion: make refs completion consistent for local and remote repos
For a local repository the __git_refs() completion helper function
lists refs under 'refs/(tags|heads|remotes)/', plus some special refs
like HEAD and ORIG_HEAD. For a remote repository, however, it lists
all refs.
Fix this inconsistency by specifying refs filter patterns for 'git
ls-remote' to only list refs under 'refs/(tags|heads|remotes)/'.
For now this makes it impossible to complete refs outside of
'refs/(tags|heads|remotes)/' in a remote repository, but a followup
patch will resurrect that.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
For a local repository the __git_refs() completion helper function
lists refs under 'refs/(tags|heads|remotes)/', plus some special refs
like HEAD and ORIG_HEAD. For a remote repository, however, it lists
all refs.
Fix this inconsistency by specifying refs filter patterns for 'git
ls-remote' to only list refs under 'refs/(tags|heads|remotes)/'.
For now this makes it impossible to complete refs outside of
'refs/(tags|heads|remotes)/' in a remote repository, but a followup
patch will resurrect that.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash | diff | blob | history |