From: Junio C Hamano Date: Tue, 17 Dec 2013 19:46:29 +0000 (-0800) Subject: Merge branch 'jk/t5000-gzip-simplify' X-Git-Tag: v1.9-rc0~68 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/aa13132d9068d77af0b1d8e2cfbf93cda4f09226?ds=inline;hp=-c Merge branch 'jk/t5000-gzip-simplify' Test fix. * jk/t5000-gzip-simplify: t5000: simplify gzip prerequisite checks --- aa13132d9068d77af0b1d8e2cfbf93cda4f09226 diff --combined t/t5000-tar-tree.sh index 11bf0b8bda,519cc34be2..05f011d38e --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@@ -3,7 -3,7 +3,7 @@@ # Copyright (C) 2005 Rene Scharfe # -test_description='git tar-tree and git get-tar-commit-id test +test_description='git archive and git get-tar-commit-id test This test covers the topics of file contents, commit date handling and commit id embedding: @@@ -13,11 -13,11 +13,11 @@@ binary file (/bin/sh). Only paths shorter than 99 characters are used. - git tar-tree applies the commit date to every file in the archive it + git archive applies the commit date to every file in the archive it creates. The test sets the commit date to a specific value and checks if the tar archive contains that value. - When giving git tar-tree a commit id (in contrast to a tree id) it + When giving git archive a commit id (in contrast to a tree id) it embeds this commit id into the tar archive as a comment. The test checks the ability of git get-tar-commit-id to figure it out from the tar file. @@@ -25,8 -25,6 +25,6 @@@ ' . ./test-lib.sh - GZIP=${GZIP:-gzip} - GUNZIP=${GUNZIP:-gzip -d} SUBSTFORMAT=%H%n @@@ -39,6 -37,8 +37,8 @@@ test_lazy_prereq TAR_NEEDS_PAX_FALLBAC ) ' + test_lazy_prereq GZIP 'gzip --version' + get_pax_header() { file=$1 header=$2= @@@ -196,6 -196,16 +196,6 @@@ test_expect_success 'git get-tar-commit-id b.commitid && test_cmp .git/$(git symbolic-ref HEAD) b.commitid' -test_expect_success 'git tar-tree' ' - git tar-tree HEAD >tar-tree.tar && - test_cmp b.tar tar-tree.tar -' - -test_expect_success 'git tar-tree with prefix' ' - git tar-tree HEAD prefix >tar-tree_with_prefix.tar && - test_cmp with_prefix.tar tar-tree_with_prefix.tar -' - test_expect_success 'git archive with --output, override inferred format' ' git archive --format=tar --output=d4.zip HEAD && test_cmp b.tar d4.zip @@@ -265,12 -275,6 +265,6 @@@ test_expect_success 'only enabled filte test_cmp remote.bar config.bar ' - if $GZIP --version >/dev/null 2>&1; then - test_set_prereq GZIP - else - say "Skipping some tar.gz tests because gzip not found" - fi - test_expect_success GZIP 'git archive --format=tgz' ' git archive --format=tgz HEAD >j.tgz ' @@@ -290,14 -294,8 +284,8 @@@ test_expect_success GZIP 'infer tgz fro test_cmp j.tgz j3.tar.gz ' - if $GUNZIP --version >/dev/null 2>&1; then - test_set_prereq GUNZIP - else - say "Skipping some tar.gz tests because gunzip was not found" - fi - - test_expect_success GZIP,GUNZIP 'extract tgz file' ' - $GUNZIP -c j.tar && + test_expect_success GZIP 'extract tgz file' ' + gzip -d -c j.tar && test_cmp b.tar j.tar '