diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-04-08 12:00:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-08 12:00:33 -0700 |
commit | 967f8c918465312cc6cc1bcbcfacafcf95152bd8 (patch) | |
tree | 72882dba893944951e58755e1f7d6a753d555b98 /t | |
parent | d59c12d7ad39f942fc60578ba1e934822f40445b (diff) | |
parent | 69e4b3426a608b4965c1cb0c6eab5252d880178b (diff) | |
download | git-967f8c918465312cc6cc1bcbcfacafcf95152bd8.tar.gz git-967f8c918465312cc6cc1bcbcfacafcf95152bd8.tar.xz |
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-x | t/t5310-pack-bitmaps.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh index f13525caa..f4f02ba91 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 ' |