config: lowercase error messages Update the configuration parsing error messages to be lower-cased for consistency with the rest of the library.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
diff --git a/src/config_parse.c b/src/config_parse.c
index ab2fb98..fde2ea0 100644
--- a/src/config_parse.c
+++ b/src/config_parse.c
@@ -75,7 +75,7 @@ static int parse_section_header_ext(git_config_parser *reader, const char *line,
first_quote = strchr(line, '"');
if (first_quote == NULL) {
- set_parse_error(reader, 0, "Missing quotation marks in section header");
+ set_parse_error(reader, 0, "missing quotation marks in section header");
goto end_error;
}
@@ -83,7 +83,7 @@ static int parse_section_header_ext(git_config_parser *reader, const char *line,
quoted_len = last_quote - first_quote;
if (quoted_len == 0) {
- set_parse_error(reader, 0, "Missing closing quotation mark in section header");
+ set_parse_error(reader, 0, "missing closing quotation mark in section header");
goto end_error;
}
@@ -107,7 +107,7 @@ static int parse_section_header_ext(git_config_parser *reader, const char *line,
switch (c) {
case 0:
- set_parse_error(reader, 0, "Unexpected end-of-line in section header");
+ set_parse_error(reader, 0, "unexpected end-of-line in section header");
goto end_error;
case '"':
@@ -117,7 +117,7 @@ static int parse_section_header_ext(git_config_parser *reader, const char *line,
c = line[++rpos];
if (c == 0) {
- set_parse_error(reader, rpos, "Unexpected end-of-line in section header");
+ set_parse_error(reader, rpos, "unexpected end-of-line in section header");
goto end_error;
}
@@ -134,7 +134,7 @@ end_parse:
goto end_error;
if (line[rpos] != '"' || line[rpos + 1] != ']') {
- set_parse_error(reader, rpos, "Unexpected text after closing quotes");
+ set_parse_error(reader, rpos, "unexpected text after closing quotes");
git_buf_dispose(&buf);
return -1;
}
@@ -165,7 +165,7 @@ static int parse_section_header(git_config_parser *reader, char **section_out)
name_end = strrchr(line, ']');
if (name_end == NULL) {
git__free(line);
- set_parse_error(reader, 0, "Missing ']' in section header");
+ set_parse_error(reader, 0, "missing ']' in section header");
return -1;
}
@@ -192,7 +192,7 @@ static int parse_section_header(git_config_parser *reader, char **section_out)
}
if (!config_keychar(c) && c != '.') {
- set_parse_error(reader, pos, "Unexpected character in header");
+ set_parse_error(reader, pos, "unexpected character in header");
goto fail_parse;
}
@@ -201,7 +201,7 @@ static int parse_section_header(git_config_parser *reader, char **section_out)
} while ((c = line[pos++]) != ']');
if (line[pos - 1] != ']') {
- set_parse_error(reader, pos, "Unexpected end of file");
+ set_parse_error(reader, pos, "unexpected end of file");
goto fail_parse;
}
@@ -386,7 +386,7 @@ static int parse_name(
name_end++;
if (line == name_end) {
- set_parse_error(reader, 0, "Invalid configuration key");
+ set_parse_error(reader, 0, "invalid configuration key");
return -1;
}
@@ -398,7 +398,7 @@ static int parse_name(
if (*value_start == '=') {
*value = value_start + 1;
} else if (*value_start) {
- set_parse_error(reader, 0, "Invalid configuration key");
+ set_parse_error(reader, 0, "invalid configuration key");
return -1;
}