X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=t%2Ft5000-tar-tree.sh;h=278eb6670116d0036413a81fc129615974458e5d;hb=53684bba4921b5a07d977ef794689de111c645b5;hp=abce66921c0d7a478271ece31329bb52b579b159;hpb=9d34c29db39bdb5c2443475dd6a24cfc5c2c9e37;p=git.git diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index abce6692..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=GMT 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 -)