X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft5000-tar-tree.sh;h=adc5e937de1a4b28b9556ca00fdfbc95dead70d7;hb=e31c9f241ae5469c820cde2a54987a1075e52a43;hp=fdd9957984904e0635fc5f4e72947ea29cb953ba;hpb=5b86040679626e36c12345039f6df62f4622aef2;p=git.git diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh old mode 100644 new mode 100755 index fdd995798..adc5e937d --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -25,6 +25,7 @@ commit id embedding: ' . ./test-lib.sh +TAR=${TAR:-tar} test_expect_success \ 'populate workdir' \ @@ -37,12 +38,12 @@ test_expect_success \ test_expect_success \ 'add files to repository' \ - 'find a -type f | xargs git-update-cache --add && - find a -type l | xargs git-update-cache --add && + 'find a -type f | xargs git-update-index --add && + find a -type l | xargs git-update-index --add && treeid=`git-write-tree` && echo $treeid >treeid && - TZ= GIT_COMMITTER_DATE="2005-05-27 22:00:00" \ - git-commit-tree $treeid .git/HEAD' + git-update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \ + git-commit-tree $treeid b.mtime && + 'TZ=GMT $TAR tvf b.tar a/a | + awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \ + >b.mtime && echo "2005-05-27 22:00:00" >expected.mtime && diff expected.mtime b.mtime' test_expect_success \ 'git-get-tar-commit-id' \ 'git-get-tar-commit-id b.commitid && - diff .git/HEAD b.commitid' + diff .git/$(git-symbolic-ref HEAD) b.commitid' test_expect_success \ 'extract tar archive' \ - '(cd b && tar xf -)