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
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-08 23:00:32 +0400
committerJunio C Hamano <gitster@pobox.com>2014-04-08 23:00:33 +0400
commit967f8c918465312cc6cc1bcbcfacafcf95152bd8 (patch)
tree72882dba893944951e58755e1f7d6a753d555b98 /t
parentd59c12d7ad39f942fc60578ba1e934822f40445b (diff)
parent69e4b3426a608b4965c1cb0c6eab5252d880178b (diff)
Merge branch 'jk/pack-bitmap'
* jk/pack-bitmap: pack-objects: do not reuse packfiles without --delta-base-offset add `ignore_missing_links` mode to revwalk
Diffstat (limited to 't')
-rwxr-xr-xt/t5310-pack-bitmaps.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
index f13525caa3..f4f02ba918 100755
--- a/t/t5310-pack-bitmaps.sh
+++ b/t/t5310-pack-bitmaps.sh
@@ -3,6 +3,10 @@
test_description='exercise basic bitmap functionality'
. ./test-lib.sh
+objpath () {
+ echo ".git/objects/$(echo "$1" | sed -e 's|\(..\)|\1/|')"
+}
+
test_expect_success 'setup repo with moderate-sized history' '
for i in $(test_seq 1 10); do
test_commit $i
@@ -115,6 +119,33 @@ test_expect_success 'fetch (full bitmap)' '
test_cmp expect actual
'
+test_expect_success 'create objects for missing-HAVE tests' '
+ blob=$(echo "missing have" | git hash-object -w --stdin) &&
+ tree=$(printf "100644 blob $blob\tfile\n" | git mktree) &&
+ parent=$(echo parent | git commit-tree $tree) &&
+ commit=$(echo commit | git commit-tree $tree -p $parent) &&
+ cat >revs <<-EOF
+ HEAD
+ ^HEAD^
+ ^$commit
+ EOF
+'
+
+test_expect_success 'pack with missing blob' '
+ rm $(objpath $blob) &&
+ git pack-objects --stdout --revs <revs >/dev/null
+'
+
+test_expect_success 'pack with missing tree' '
+ rm $(objpath $tree) &&
+ git pack-objects --stdout --revs <revs >/dev/null
+'
+
+test_expect_success 'pack with missing parent' '
+ rm $(objpath $parent) &&
+ git pack-objects --stdout --revs <revs >/dev/null
+'
+
test_lazy_prereq JGIT '
type jgit
'