Merge branch 'jk/config-no-ungetc-eof'
Reading configuration from a blob object, when it ends with a lone CR, use to confuse the configuration parser. * jk/config-no-ungetc-eof: config_buf_ungetc: warn when pushing back a random character config: do not ungetc EOF
This commit is contained in:
@ -67,4 +67,13 @@ test_expect_success 'parse errors in blobs are properly attributed' '
|
||||
grep "HEAD:config" err
|
||||
'
|
||||
|
||||
test_expect_success 'can parse blob ending with CR' '
|
||||
printf "[some]key = value\\r" >config &&
|
||||
git add config &&
|
||||
git commit -m CR &&
|
||||
echo value >expect &&
|
||||
git config --blob=HEAD:config some.key >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user