[PATCH] completion: recognize "--local" as a config file source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <dpaddock@xxxxxxxx>
Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]