diff options
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-x | t/t5000-tar-tree.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 2a97b27b0a..37655a237c 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -94,6 +94,13 @@ check_tar() { ' } +test_expect_success 'setup' ' + test_oid_cache <<-EOF + obj sha1:19f9c8273ec45a8938e6999cb59b3ff66739902a + obj sha256:3c666f798798601571f5cec0adb57ce4aba8546875e7693177e0535f34d2c49b + EOF +' + test_expect_success \ 'populate workdir' \ 'mkdir a && @@ -206,6 +213,12 @@ test_expect_success 'git archive with --output, override inferred format' ' test_cmp_bin b.tar d4.zip ' +test_expect_success GZIP 'git archive with --output and --remote creates .tgz' ' + git archive --output=d5.tgz --remote=. HEAD && + gzip -d -c <d5.tgz >d5.tar && + test_cmp_bin b.tar d5.tar +' + test_expect_success 'git archive --list outside of a git repo' ' nongit git archive --list ' @@ -363,11 +376,10 @@ test_lazy_prereq TAR_HUGE ' ' test_expect_success LONG_IS_64BIT 'set up repository with huge blob' ' - obj_d=19 && - obj_f=f9c8273ec45a8938e6999cb59b3ff66739902a && - obj=${obj_d}${obj_f} && - mkdir -p .git/objects/$obj_d && - cp "$TEST_DIRECTORY"/t5000/$obj .git/objects/$obj_d/$obj_f && + obj=$(test_oid obj) && + path=$(test_oid_to_path $obj) && + mkdir -p .git/objects/$(dirname $path) && + cp "$TEST_DIRECTORY"/t5000/huge-object .git/objects/$path && rm -f .git/index && git update-index --add --cacheinfo 100644,$obj,huge && git commit -m huge |