X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=t%2Ft5000-tar-tree.sh;h=278eb6670116d0036413a81fc129615974458e5d;hb=dd371b49f98d9c08f7fbd4900976739a6aeb9ec6;hp=6d72ed34c10f734bc0f22a0155d789130548bc6d;hpb=f10e0e0b18c8e2e69535e7380fb3c1f9b097cfda;p=git.git diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 6d72ed34..278eb667 100755 --- 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' \ @@ -33,16 +34,19 @@ test_expect_success \ mkdir a/bin && cp /bin/sh a/bin && ln -s a a/l1 && + (p=long_path_to_a_file && cd a && + for depth in 1 2 3 4 5; do mkdir $p && cd $p; done && + echo text >file_with_long_path) && (cd a && find .) | sort >a.lst' 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 && echo "2005-05-27 22:00:00" >expected.mtime && @@ -59,11 +63,11 @@ test_expect_success \ 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 -)