diff options
author | 2015-02-18 11:45:01 -0800 | |
---|---|---|
committer | 2015-02-18 11:45:01 -0800 | |
commit | de15bdb0583a1a65bf1bab47b7bec9bdc03f727a (patch) | |
tree | 36d6f1b6626f57b3a0fcfd93958e29b2aa4fcf4d /t | |
parent | Merge branch 'jk/pack-bitmap' (diff) | |
parent | config_buf_ungetc: warn when pushing back a random character (diff) | |
download | tgif-de15bdb0583a1a65bf1bab47b7bec9bdc03f727a.tar.xz |
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
Diffstat (limited to 't')
-rwxr-xr-x | t/t1307-config-blob.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t1307-config-blob.sh b/t/t1307-config-blob.sh index fdc257e66f..3c6791e6be 100755 --- a/t/t1307-config-blob.sh +++ b/t/t1307-config-blob.sh @@ -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 |