aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-25 16:23:26 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-25 16:23:26 -0700
commit5cfe4256d98af22a570c78c5e3048391a90f5f98 (patch)
tree2a168e5e4c4f52e0c58c6078304c9757f728c4e6 /t
parent84da3e21dc008fe7ba18811e8b7f7614ede33079 (diff)
parent4dd1fbc7b1df0030f813a05cee19cad2c7a9cbf9 (diff)
downloadgit-5cfe4256d98af22a570c78c5e3048391a90f5f98.tar.gz
git-5cfe4256d98af22a570c78c5e3048391a90f5f98.tar.xz
Merge branch 'jc/bigfile'
* jc/bigfile: Bigfile: teach "git add" to send a large file straight to a pack index_fd(): split into two helper functions index_fd(): turn write_object and format_check arguments into one flag
Diffstat (limited to 't')
-rwxr-xr-xt/t1050-large.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
new file mode 100755
index 000000000..deba111bd
--- /dev/null
+++ b/t/t1050-large.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (c) 2011, Google Inc.
+
+test_description='adding and checking out large blobs'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ git config core.bigfilethreshold 200k &&
+ echo X | dd of=large bs=1k seek=2000
+'
+
+test_expect_success 'add a large file' '
+ git add large &&
+ # make sure we got a packfile and no loose objects
+ test -f .git/objects/pack/pack-*.pack &&
+ test ! -f .git/objects/??/??????????????????????????????????????
+'
+
+test_expect_success 'checkout a large file' '
+ large=$(git rev-parse :large) &&
+ git update-index --add --cacheinfo 100644 $large another &&
+ git checkout another &&
+ cmp large another ;# this must not be test_cmp
+'
+
+test_done