summaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2016-04-25 21:17:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-11 21:56:00 (GMT)
commitd9545c7f465ed103df44cd93caddfdd265757779 (patch)
tree6761dd88c70a108724c3db033689d328a8d1f5b4 /t/t9300-fast-import.sh
parent6a6636270fbaf74609cd3e1bd207dd2c420d640a (diff)
downloadgit-d9545c7f465ed103df44cd93caddfdd265757779.zip
git-d9545c7f465ed103df44cd93caddfdd265757779.tar.gz
git-d9545c7f465ed103df44cd93caddfdd265757779.tar.bz2
fast-import: implement unpack limit
With many incremental imports, small packs become highly inefficient due to the need to readdir scan and load many indices to locate even a single object. Frequent repacking and consolidation may be prohibitively expensive in terms of disk I/O, especially in large repositories where the initial packs were aggressively optimized and marked with .keep files. In those cases, users may be better served with loose objects and relying on "git gc --auto". This changes the default behavior of fast-import for small imports found in test cases, so adjustments to t9300 were necessary. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-xt/t9300-fast-import.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 25bb60b..e6a2b8a 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -52,6 +52,7 @@ echo "$@"'
###
test_expect_success 'empty stream succeeds' '
+ git config fastimport.unpackLimit 0 &&
git fast-import </dev/null
'
@@ -2675,6 +2676,7 @@ test_expect_success 'R: blob bigger than threshold' '
echo >>input &&
test_create_repo R &&
+ git --git-dir=R/.git config fastimport.unpackLimit 0 &&
git --git-dir=R/.git fast-import --big-file-threshold=1 <input
'