From: Johannes Schindelin Date: Tue, 11 Oct 2005 22:15:15 +0000 (-0700) Subject: Use git-update-ref and git-symbolic-ref in tests X-Git-Tag: v0.99.9~152 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0a81552e06037a57eeb1f784564a3ac092f60dfb;p=git.git Use git-update-ref and git-symbolic-ref in tests This makes all tests pass on cygwin. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 5dffb8e1..4db1bb11 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -41,8 +41,8 @@ test_expect_success \ 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.commitid && - diff .git/HEAD b.commitid' + diff .git/$(git-symbolic-ref HEAD) b.commitid' test_expect_success \ 'extract tar archive' \ diff --git a/t/t6001-rev-list-merge-order.sh b/t/t6001-rev-list-merge-order.sh index 01012423..8ec9ebb9 100755 --- a/t/t6001-rev-list-merge-order.sh +++ b/t/t6001-rev-list-merge-order.sh @@ -108,7 +108,7 @@ save_tag h2 unique_commit g4 tree -p g2 save_tag g3 unique_commit g5 tree -p g2 save_tag g4 unique_commit g6 tree -p g3 -p h2 -tag l5 > .git/HEAD +git-update-ref HEAD $(tag l5) test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' < .git/HEAD +git-update-ref HEAD $(tag l5) # E diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh index 88d14ee1..3c4c44c2 100755 --- a/t/t6003-rev-list-topo-order.sh +++ b/t/t6003-rev-list-topo-order.sh @@ -77,7 +77,7 @@ save_tag h2 unique_commit g4 tree -p g2 save_tag g3 unique_commit g5 tree -p g2 save_tag g4 unique_commit g6 tree -p g3 -p h2 -tag l5 > .git/HEAD +git-update-ref HEAD $(tag l5) test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <