summaryrefslogtreecommitdiff
path: root/t/t5302-pack-index.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-03-06 21:25:32 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-06 21:25:32 -0800
commit283e4e7cd35ae61d86e6a3a61cfea283adc09ba5 (patch)
treec91177c0883fdbd4e347cc7f532fe281a2368089 /t/t5302-pack-index.sh
parentMerge branch 'ac/usage-string-fixups' (diff)
parentindex-pack: clarify the breached limit (diff)
downloadtgif-283e4e7cd35ae61d86e6a3a61cfea283adc09ba5.tar.xz
Merge branch 'mc/index-pack-report-max-size'
When "index-pack" dies due to incoming data exceeding the maximum allowed input size, include the value of the limit in the error message. * mc/index-pack-report-max-size: index-pack: clarify the breached limit
Diffstat (limited to 't/t5302-pack-index.sh')
-rwxr-xr-xt/t5302-pack-index.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 8ee67df38f..b0095ab41d 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 </dev/null) &&
+ sz="$(test_file_size pack-$pack.pack)" &&
+ test "$sz" -gt 20 &&
+ test_must_fail git index-pack --max-input-size=20 pack-$pack.pack 2>err &&
+ grep "maximum allowed size (20 bytes)" err
+'
+
test_done