diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-02-08 10:02:29 +0000 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-02-08 17:13:53 +0000 |
commit | 848153f386b45363d033c72e155e4001d0217f96 (patch) | |
tree | 9aed7a3bc66253f2ffdf2317ef7e1511eb701764 /src/config_parse.c | |
parent | 5340ca774cbe702eb0115e74b559884003c61232 (diff) | |
download | libgit2-848153f386b45363d033c72e155e4001d0217f96.tar.gz |
config_parse: handle empty lines with CRLF
Currently, the configuration parser will fail reading empty lines with
just an CRLF-style line ending. Special-case the '\r' character in order
to handle it the same as Unix-style line endings. Add tests to spot this
regression in the future.
Diffstat (limited to 'src/config_parse.c')
-rw-r--r-- | src/config_parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config_parse.c b/src/config_parse.c index 2b9669c2b..981f968bb 100644 --- a/src/config_parse.c +++ b/src/config_parse.c @@ -495,6 +495,7 @@ int git_config_parse( break; case '\n': /* comment or whitespace-only */ + case '\r': case ' ': case '\t': case ';': |