Re: [PATCH v5 1/9] submodule: add a print_config_from_gitmodules() helper
- From
Antonio Ospite <ao2@ao2.it>
- Date
- Sep 24, 2018, 10:25 UTC
- Message-ID
- <20180924122502.f932da9d6b71c1f81341040a@ao2.it>
- In-Reply-To
- <20180917140940.3839-2-ao2@ao2.it>
On Mon, 17 Sep 2018 16:09:32 +0200 Antonio Ospite <ao2@ao2.it> wrote:
> Add a new print_config_from_gitmodules() helper function to print values > from .gitmodules just like "git config -f .gitmodules" would. >
[...]
> +int print_config_from_gitmodules(const char *key)
I am thinking about adding a "struct repository" argument to this function
Show 9 quoted lines
> +{
> + int ret;
> + char *store_key;
> +
> + ret = git_config_parse_key(key, &store_key, NULL);
> + if (ret < 0)
> + return CONFIG_INVALID_KEY;
> +
> + config_from_gitmodules(config_print_callback, the_repository, store_key);And use it here, to avoid another usage of "the_repository" when it's not strictly necessary.
Ciao, Antonio
-- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?