diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-12-13 12:19:11 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-12-13 12:19:11 (GMT) |
commit | 8253c0042147e005aecc4fdf24520d1ec2ab1642 (patch) | |
tree | a48384374c2e022cf6205633a2a263c4d2e3d730 /t/t1450-fsck.sh | |
parent | fcdaa211e6127eeba69a121844e08aec67da2131 (diff) | |
parent | 02f498172348f7ba9dceb169305b74c7eca7a38d (diff) | |
download | git-8253c0042147e005aecc4fdf24520d1ec2ab1642.zip git-8253c0042147e005aecc4fdf24520d1ec2ab1642.tar.gz git-8253c0042147e005aecc4fdf24520d1ec2ab1642.tar.bz2 |
Merge branch 'maint-2.35' into maint-2.36
Diffstat (limited to 't/t1450-fsck.sh')
-rwxr-xr-x | t/t1450-fsck.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh index ab7f31f..0206d98 100755 --- a/t/t1450-fsck.sh +++ b/t/t1450-fsck.sh @@ -937,4 +937,28 @@ test_expect_success 'fsck error and recovery on invalid object type' ' ) ' +test_expect_success 'fsck error on gitattributes with excessive line lengths' ' + blob=$(printf "pattern %02048d" 1 | git hash-object -w --stdin) && + test_when_finished "remove_object $blob" && + tree=$(printf "100644 blob %s\t%s\n" $blob .gitattributes | git mktree) && + test_when_finished "remove_object $tree" && + cat >expected <<-EOF && + error in blob $blob: gitattributesLineLength: .gitattributes has too long lines to parse + EOF + test_must_fail git fsck --no-dangling >actual 2>&1 && + test_cmp expected actual +' + +test_expect_success 'fsck error on gitattributes with excessive size' ' + blob=$(test-tool genzeros $((100 * 1024 * 1024 + 1)) | git hash-object -w --stdin) && + test_when_finished "remove_object $blob" && + tree=$(printf "100644 blob %s\t%s\n" $blob .gitattributes | git mktree) && + test_when_finished "remove_object $tree" && + cat >expected <<-EOF && + error in blob $blob: gitattributesLarge: .gitattributes too large to parse + EOF + test_must_fail git fsck --no-dangling >actual 2>&1 && + test_cmp expected actual +' + test_done |