Don't error on missing section, just continue
diff --git a/src/config_file.c b/src/config_file.c
index b46b0ab..c21d902 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1035,12 +1035,11 @@ static int read_on_variable(
GIT_UNUSED(line);
GIT_UNUSED(line_len);
- if (!current_section) {
- giterr_set(GITERR_CONFIG, "no section for key: %s", var_name);
- return -1;
+ if (current_section) {
+ git_buf_puts(&buf, current_section);
+ git_buf_putc(&buf, '.');
}
- git_buf_puts(&buf, current_section);
- git_buf_putc(&buf, '.');
+
for (c = var_name; *c; c++)
git_buf_putc(&buf, git__tolower(*c));