@matheusbsbs / matheus-bagliano / commits / 0a81552e06
Fork 0

Use git-update-ref and git-symbolic-ref in tests

This makes all tests pass on cygwin. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Oct 11, 2005 at 15:15 UTC 0a81552e06037a57eeb1f784564a3ac092f60dfb
4 files changed +6 -6
t/t5000-tar-tree.sh
+3 -3
@@ -41,8 +41,8 @@ test_expect_success \
41 find a -type l | xargs git-update-index --add &&
42 treeid=`git-write-tree` &&
43 echo $treeid >treeid &&
44 - TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
45 - git-commit-tree $treeid </dev/null >.git/HEAD'
44 + git-update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
45 + git-commit-tree $treeid </dev/null)'
46
47 test_expect_success \
48 'git-tar-tree' \
@@ -59,7 +59,7 @@ test_expect_success \
59 test_expect_success \
60 'git-get-tar-commit-id' \
61 'git-get-tar-commit-id <b.tar >b.commitid &&
62 - diff .git/HEAD b.commitid'
62 + diff .git/$(git-symbolic-ref HEAD) b.commitid'
63
64 test_expect_success \
65 'extract tar archive' \
t/t6001-rev-list-merge-order.sh
+1 -1
@@ -108,7 +108,7 @@ save_tag h2 unique_commit g4 tree -p g2
108 save_tag g3 unique_commit g5 tree -p g2
109 save_tag g4 unique_commit g6 tree -p g3 -p h2
110
111 -tag l5 > .git/HEAD
111 +git-update-ref HEAD $(tag l5)
112
113 test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
114 19
t/t6002-rev-list-bisect.sh
+1 -1
@@ -58,7 +58,7 @@ on_committer_date "1971-08-16 00:00:15" save_tag a4 unique_commit a4 tree -p a3
58 on_committer_date "1971-08-16 00:00:16" save_tag l3 unique_commit l3 tree -p a4
59 on_committer_date "1971-08-16 00:00:17" save_tag l4 unique_commit l4 tree -p l3
60 on_committer_date "1971-08-16 00:00:18" save_tag l5 unique_commit l5 tree -p l4
61 -tag l5 > .git/HEAD
61 +git-update-ref HEAD $(tag l5)
62
63
64 # E
t/t6003-rev-list-topo-order.sh
+1 -1
@@ -77,7 +77,7 @@ save_tag h2 unique_commit g4 tree -p g2
77 save_tag g3 unique_commit g5 tree -p g2
78 save_tag g4 unique_commit g6 tree -p g3 -p h2
79
80 -tag l5 > .git/HEAD
80 +git-update-ref HEAD $(tag l5)
81
82 test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
83 19