Thread (20 messages) flat view 20 messages, 3 authors, 2018-10-01

Re: [PATCH v5 1/9] submodule: add a print_config_from_gitmodules() helper

From: Antonio Ospite <hidden>
Date: 2018-09-24 10:25:07

On Mon, 17 Sep 2018 16:09:32 +0200
Antonio Ospite [off-list ref] 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
+{
+	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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help