Merge branch 'maint'
[gitweb.git] / contrib / completion / git-completion.bash
index 1f44ec209234affa214af307c8e2c86c2847073e..9c488646d04f9fa08d9b2f2445b2a83d9bc4de40 100755 (executable)
@@ -1357,11 +1357,12 @@ __git_config_get_set_variables ()
                c=$((--c))
        done
 
-       for i in $(git --git-dir="$(__gitdir)" config $config_file --list \
-                       2>/dev/null); do
-               case "$i" in
-               *.*)
-                       echo "${i/=*/}"
+       git --git-dir="$(__gitdir)" config $config_file --list 2>/dev/null |
+       while read line
+       do
+               case "$line" in
+               *.*=*)
+                       echo "${line/=*/}"
                        ;;
                esac
        done