summaryrefslogtreecommitdiff
path: root/t/t1050-large.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-06-28 15:19:51 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-28 15:19:51 -0700
commit6f20ca3e092343ffffc22438aae25c013539d47e (patch)
tree6111d4f99a1a55bfebf2804933576cc5239447cb /t/t1050-large.sh
parentMerge branch 'nd/stream-index-pack' (diff)
parentpack-objects: use streaming interface for reading large loose blobs (diff)
downloadtgif-6f20ca3e092343ffffc22438aae25c013539d47e.tar.xz
Merge branch 'nd/stream-pack-objects'
"pack-objects" learned to read large loose blobs using the streaming API, without the need to hold everything in core at once.
Diffstat (limited to 't/t1050-large.sh')
-rwxr-xr-xt/t1050-large.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index 3f806889a9..fd10528009 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -139,6 +139,18 @@ test_expect_success 'repack' '
git repack -ad
'
+test_expect_success 'pack-objects with large loose object' '
+ SHA1=`git hash-object huge` &&
+ test_create_repo loose &&
+ echo $SHA1 | git pack-objects --stdout |
+ GIT_ALLOC_LIMIT=0 GIT_DIR=loose/.git git unpack-objects &&
+ echo $SHA1 | GIT_DIR=loose/.git git pack-objects pack &&
+ test_create_repo packed &&
+ mv pack-* packed/.git/objects/pack &&
+ GIT_DIR=packed/.git git cat-file blob $SHA1 >actual &&
+ cmp huge actual
+'
+
test_expect_success 'tar achiving' '
git archive --format=tar HEAD >/dev/null
'