From: Junio C Hamano Date: Tue, 17 Mar 2015 23:01:30 +0000 (-0700) Subject: Merge branch 'sg/completion-remote' X-Git-Tag: v2.4.0-rc0~44 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e5b8ce243cc41a859469098a0f26d7ee1b1a49bc?ds=inline;hp=-c Merge branch 'sg/completion-remote' Code simplification. * sg/completion-remote: completion: simplify __git_remotes() completion: add a test for __git_remotes() helper function --- e5b8ce243cc41a859469098a0f26d7ee1b1a49bc diff --combined contrib/completion/git-completion.bash index c21190d751,d722b0a895..f5ae5e3a8c --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -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 () @@@ -1425,7 -1422,7 +1422,7 @@@ __git_log_gitk_options= # Options that go well for log and shortlog (not gitk) __git_log_shortlog_options=" --author= --committer= --grep= - --all-match + --all-match --invert-grep " __git_log_pretty_formats="oneline short medium full fuller email raw format:"