config_parse: add comment to clarify logic getting next character Upon each line, the configuration parser tries to get either the first non-whitespace character or the first whitespace character, in case there is no non-whitespace character. The logic handling this looks rather odd and doesn't immediately convey this meaning, so add a comment to clarify what happens.
diff --git a/src/config_parse.c b/src/config_parse.c
index 586bba8..2b9669c 100644
--- a/src/config_parse.c
+++ b/src/config_parse.c
@@ -475,6 +475,11 @@ int git_config_parse(
size_t line_len = parser->ctx.line_len;
char c;
+ /*
+ * Get either first non-whitespace character or, if that does
+ * not exist, the first whitespace character. This is required
+ * to preserve whitespaces when writing back the file.
+ */
if (git_parse_peek(&c, ctx, GIT_PARSE_PEEK_SKIP_WHITESPACE) < 0 &&
git_parse_peek(&c, ctx, 0) < 0)
continue;