Code

Merge branch 'sg/complete-refs'
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Dec 2011 21:37:18 +0000 (13:37 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Dec 2011 21:37:18 +0000 (13:37 -0800)
* sg/complete-refs:
  completion: remove broken dead code from __git_heads() and __git_tags()
  completion: fast initial completion for config 'remote.*.fetch' value
  completion: improve ls-remote output filtering in __git_refs_remotes()
  completion: query only refs/heads/ in __git_refs_remotes()
  completion: support full refs from remote repositories
  completion: improve ls-remote output filtering in __git_refs()
  completion: make refs completion consistent for local and remote repos
  completion: optimize refs completion
  completion: document __gitcomp()

Conflicts:
contrib/completion/git-completion.bash

1  2 
contrib/completion/git-completion.bash

index b7c1edf1cc763199d41a490b212a3b65ea581a86,16623d7c3f001201819949fdf9c006e968e42369..cc1bdf960949cfeb977d8a188a2324b48bf5c6df
@@@ -1456,16 -1466,7 +1471,16 @@@ _git_grep (
                ;;
        esac
  
-                       __gitcomp "$(__git_match_ctag "$cur" tags)"
 +      case "$cword,$prev" in
 +      2,*|*,-*)
 +              if test -r tags; then
-       __gitcomp "$(__git_refs)"
++                      __gitcomp_nl "$(__git_match_ctag "$cur" tags)"
 +                      return
 +              fi
 +              ;;
 +      esac
 +
+       __gitcomp_nl "$(__git_refs)"
  }
  
  _git_help ()