completion: support 'git config --local'

This needs to be done in two places: __git_config_get_set_variables to allow clever completion of "git config --local --get foo<tab>", and _git_config to allow "git config --loc<tab>" to complete to --local. While we're there, change the order of options in the code to match git-config.txt. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthieu Moy committed Feb 12, 2013 at 13:20 UTC 66c0786ca59ec2f281fe9c78521b79f8bccfc954
1 file changed +2 -2
contrib/completion/git-completion.bash
+2 -2
@@ -1779,7 +1779,7 @@ __git_config_get_set_variables ()
1779 while [ $c -gt 1 ]; do
1780 word="${words[c]}"
1781 case "$word" in
1782 - --global|--system|--file=*)
1782 + --system|--global|--local|--file=*)
1783 config_file="$word"
1784 break
1785 ;;
@@ -1885,7 +1885,7 @@ _git_config ()
1885 case "$cur" in
1886 --*)
1887 __gitcomp "
1888 - --global --system --file=
1888 + --system --global --local --file=
1889 --list --replace-all
1890 --get --get-all --get-regexp
1891 --add --unset --unset-all