Jeff King <p...@peff.net> writes:

> That being said, git-config _should_ be lowercasing to match the normal
> --get code path. I think the fix (squashable on top of 6/6 + my earlier
> patch) is just:
>
> diff --git a/builtin/config.c b/builtin/config.c
> index c35c5be..9328a90 100644
> --- a/builtin/config.c
> +++ b/builtin/config.c
> @@ -589,7 +589,9 @@ int cmd_config(int argc, const char **argv, const char 
> *prefix)
>       }
>       else if (actions == ACTION_GET_URLMATCH) {
>               check_argc(argc, 2, 2);
> -             return get_urlmatch(argv[0], argv[1]);
> +             if (git_config_parse_key(argv[0], &key, NULL))
> +                     return CONFIG_INVALID_KEY;
> +             return get_urlmatch(key, argv[1]);
>       }
>       else if (actions == ACTION_UNSET) {
>               check_argc(argc, 1, 2);

If we drop the "list every key in section.*" mode, the above should
be sufficient, I think.

I do not know how useful it would be to be for a scripted Porcelain
to be able to ask

    $ git config --get-urlmatch http https://weak.example.com/path/to/git.git

and get all the "http.*" variables that will apply to the given URL.
--
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