Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-08-16 07:08:03 +0400
committerJunio C Hamano <gitster@pobox.com>2014-08-18 21:15:19 +0400
commit735efde838b68747e737e863427a4843a8efaddb (patch)
tree4cef9ebadedd09e57441e0bcba740418e9ba5395 /t/t1050-large.sh
parentf8bb1d94311b7438e7e9831b51ffb047b7ae65d7 (diff)
sha1_file.c: do not die failing to malloc in unpack_compressed_entry
Fewer die() gives better control to the caller, provided that the caller _can_ handle it. And in unpack_compressed_entry() case, it can, because unpack_compressed_entry() already returns NULL if it fails to inflate data. A side effect from this is fsck continues to run when very large blobs are present (and do not fit in memory). Noticed-by: Dale R. Worley <worley@alum.mit.edu> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1050-large.sh')
-rwxr-xr-xt/t1050-large.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index aea493646e..5642f84b83 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -163,4 +163,10 @@ test_expect_success 'zip achiving, deflate' '
git archive --format=zip HEAD >/dev/null
'
+test_expect_success 'fsck' '
+ test_must_fail git fsck 2>err &&
+ n=$(grep "error: attempting to allocate .* over limit" err | wc -l) &&
+ test "$n" -gt 1
+'
+
test_done