On 7/11/2014 7:51 PM, Matthieu Moy wrote:
+`int git_configset_add_file(struct config_set *cs, const char *filename)`::
+
+Parses the file and adds the variable-value pairs to the `config_set`,
+dies if there is an error in parsing the file.
The return value is undocumented.
If
Tanay Abhra tanay...@gmail.com writes:
I checked the whole codebase and in all of the cases if they cannot read a
file
they return -1 and continue running.
More precisely: in git_config_from_file, any fopen failure results in
return -1. But in git_config_early (one caller of
Hi,
I had a closer look at error management (once more, sorry: I should have
done this earlier...), and it seems to me that:
* Not all errors are managed properly
* Most error cases are untested
Among the cases I can think of:
* Syntax error when parsing the file
* Non-existant file
*
Tanay Abhra tanay...@gmail.com writes:
diff --git a/config.c b/config.c
index ba882a1..aa58275 100644
--- a/config.c
+++ b/config.c
@@ -9,6 +9,8 @@
#include exec_cmd.h
#include strbuf.h
#include quote.h
+#include hashmap.h
+#include string-list.h
struct config_source {
4 matches
Mail list logo