From: Junio C Hamano Date: Sat, 28 Mar 2015 16:33:15 +0000 (-0700) Subject: Merge branch 'sg/completion-gitcomp-nl-for-refs' into maint X-Git-Tag: v2.3.5~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4eea8e3fa0c41137d7126a0ff262eb7a85991b90?ds=sidebyside;hp=-c Merge branch 'sg/completion-gitcomp-nl-for-refs' into maint Code clean-up. * sg/completion-gitcomp-nl-for-refs: completion: use __gitcomp_nl() for completing refs --- 4eea8e3fa0c41137d7126a0ff262eb7a85991b90 diff --combined contrib/completion/git-completion.bash index 485619c260,05a3aa426f..661a8294da --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -411,9 -411,12 +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 () @@@ -977,7 -980,7 +977,7 @@@ _git_branch ( case "$cur" in --set-upstream-to=*) - __gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}" + __gitcomp_nl "$(__git_refs)" "" "${cur##--set-upstream-to=}" ;; --*) __gitcomp " @@@ -1045,7 -1048,7 +1045,7 @@@ _git_checkout ( _git_cherry () { - __gitcomp "$(__git_refs)" + __gitcomp_nl "$(__git_refs)" } _git_cherry_pick () @@@ -1302,7 -1305,7 +1302,7 @@@ _git_gitk ( } __git_match_ctag() { - awk "/^${1////\\/}/ { print \$1 }" "$2" + awk "/^${1//\//\\/}/ { print \$1 }" "$2" } _git_grep () @@@ -2011,7 -2014,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