Merge branch 'sg/completion-remote' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 23 Mar 2015 18:23:33 +0000 (11:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Mar 2015 18:23:33 +0000 (11:23 -0700)
Code simplification.

* sg/completion-remote:
completion: simplify __git_remotes()
completion: add a test for __git_remotes() helper function

1  2 
contrib/completion/git-completion.bash
index 1e8965b828b19efa501c5631b364cd0187697759,d722b0a895fd650d04eb710fa08911085abff4c5..b8929084d079ef29987f7074dfb926f923b7697e
@@@ -411,12 -411,9 +411,9 @@@ __git_refs_remotes (
  
  __git_remotes ()
  {
-       local i IFS=$'\n' d="$(__gitdir)"
+       local d="$(__gitdir)"
        test -d "$d/remotes" && ls -1 "$d/remotes"
-       for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do
-               i="${i#remote.}"
-               echo "${i/.url*/}"
-       done
+       git --git-dir="$d" remote
  }
  
  __git_list_merge_strategies ()
@@@ -2014,7 -2011,6 +2011,7 @@@ _git_config (
                color.status.changed
                color.status.header
                color.status.nobranch
 +              color.status.unmerged
                color.status.untracked
                color.status.updated
                color.ui