When we are trying to show the list of config variables in a
file, we recognize "--system", "--global", and "--file" as
specifying a particular file. This list misses "--local",
which performs a similar function.

Without this patch, completing:

  git config --get --local

shows items from all config files, not just the local one.

Noticed-by: Dasa Paddock <dpadd...@esri.com>
Signed-off-by: Jeff King <p...@peff.net>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash 
b/contrib/completion/git-completion.bash
index c8452fb..0b7b659 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1779,7 +1779,7 @@ __git_config_get_set_variables ()
        while [ $c -gt 1 ]; do
                word="${words[c]}"
                case "$word" in
-               --global|--system|--file=*)
+               --global|--system|--local|--file=*)
                        config_file="$word"
                        break
                        ;;
-- 
1.8.1.2.11.g1a2f572

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to