Thread (6 messages) 6 messages, 3 authors, 2016-06-15

Re: [PATCH v9r2 1/2] add `config_set` API for caching config-like files

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:01:56

Possibly related (same subject, not in this thread)

Tanay Abhra [off-list ref] writes:
implemented as a thin wrapper around the `config_set` API.

Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Tanay Abhra <redacted>
 Documentation/technical/api-config.txt | 137 +++++++++++++++++
 cache.h                                |  30 ++++
 config.c                               | 264 +++++++++++++++++++++++++++++++++
 3 files changed, 431 insertions(+)
(you broke the patch by removing the ---)
+static void git_config_check_init(void)
+{
+	if (the_config_set.hash_initialized)
+		return;
+	git_configset_init(&the_config_set);
+	git_config(config_set_callback, &the_config_set);
+}
So, you're now ignoring the return value of git_config. What is the
rationale for this? In particular, why did you reject the "die"
possibility (I understood that you were inclined to take this option, so
I'm curious why you changed your mind).

OTOH, you're transmitting the return value without dying here:

+int git_configset_add_file(struct config_set *cs, const char *filename)
+{
+	return git_config_from_file(config_set_callback, filename, cs);
+}

and I think this one is correct, as we cannot tell in advance how
serious an error would be for any callers. And we do test this (I think
we can improve a bit, I'll send a fixup patch).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help