Unverified Commit 1f6263b8 by Edward Thomson Committed by GitHub

Merge pull request #6043 from basile-henry/config-multiline-comment-chars

Fix config parsing for multiline with multiple quoted comment chars
parents baf001ed 574c590f
......@@ -349,7 +349,7 @@ static int parse_multiline_variable(git_config_parser *reader, git_buf *value, i
}
/* If it was just a comment, pretend it didn't exist */
quote_count = strip_comments(line, !!in_quotes);
quote_count = strip_comments(line, in_quotes);
if (line[0] == '\0')
goto next;
......
......@@ -213,6 +213,13 @@ void test_config_read__symbol_headers(void)
git_config_free(cfg);
}
void test_config_read__multiline_multiple_quoted_comment_chars(void)
{
git_config *cfg;
cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config21")));
git_config_free(cfg);
}
void test_config_read__header_in_last_line(void)
{
git_config *cfg;
......
[alias]
m = '\
";" \
";" \
'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment