From: Matt Cooper via GitGitGadget Date: Wed, 23 Feb 2022 16:03:13 GMT Subject: [PATCH 2/2] t5302: confirm that large packs mention limit Message-ID: <43990408a10d65058d872f13ea9619e85de7081d.1645632193.git.gitgitgadget@gmail.com> In-Reply-To: From: Matt Cooper When a pack can't be processed because it's too large, we report the exact nature of the breach. This test ensures that the error message has a human-readable size included. Signed-off-by: Matt Cooper Helped-by: Taylor Blau Helped-by: Derrick Stolee --- t/t5302-pack-index.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index 8ee67df38f6..b0095ab41d3 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -284,4 +284,12 @@ test_expect_success 'index-pack -v --stdin produces progress for both phases' ' test_i18ngrep "Resolving deltas" err ' +test_expect_success 'too-large packs report the breach' ' + pack=$(git pack-objects --all pack err && + grep "maximum allowed size (20 bytes)" err +' + test_done -- gitgitgadget