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>
This commit is contained in:
Johannes Schindelin 2005-10-11 15:15:15 -07:00 коммит произвёл Junio C Hamano
Родитель dc1b5ea878
Коммит 0a81552e06
4 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -41,8 +41,8 @@ test_expect_success \
find a -type l | xargs git-update-index --add && find a -type l | xargs git-update-index --add &&
treeid=`git-write-tree` && treeid=`git-write-tree` &&
echo $treeid >treeid && echo $treeid >treeid &&
TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \ git-update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
git-commit-tree $treeid </dev/null >.git/HEAD' git-commit-tree $treeid </dev/null)'
test_expect_success \ test_expect_success \
'git-tar-tree' \ 'git-tar-tree' \
@ -59,7 +59,7 @@ test_expect_success \
test_expect_success \ test_expect_success \
'git-get-tar-commit-id' \ 'git-get-tar-commit-id' \
'git-get-tar-commit-id <b.tar >b.commitid && 'git-get-tar-commit-id <b.tar >b.commitid &&
diff .git/HEAD b.commitid' diff .git/$(git-symbolic-ref HEAD) b.commitid'
test_expect_success \ test_expect_success \
'extract tar archive' \ 'extract tar archive' \

Просмотреть файл

@ -108,7 +108,7 @@ save_tag h2 unique_commit g4 tree -p g2
save_tag g3 unique_commit g5 tree -p g2 save_tag g3 unique_commit g5 tree -p g2
save_tag g4 unique_commit g6 tree -p g3 -p h2 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 " "' <<EOF test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
19 19

Просмотреть файл

@ -58,7 +58,7 @@ on_committer_date "1971-08-16 00:00:15" save_tag a4 unique_commit a4 tree -p a3
on_committer_date "1971-08-16 00:00:16" save_tag l3 unique_commit l3 tree -p a4 on_committer_date "1971-08-16 00:00:16" save_tag l3 unique_commit l3 tree -p a4
on_committer_date "1971-08-16 00:00:17" save_tag l4 unique_commit l4 tree -p l3 on_committer_date "1971-08-16 00:00:17" save_tag l4 unique_commit l4 tree -p l3
on_committer_date "1971-08-16 00:00:18" save_tag l5 unique_commit l5 tree -p l4 on_committer_date "1971-08-16 00:00:18" save_tag l5 unique_commit l5 tree -p l4
tag l5 > .git/HEAD git-update-ref HEAD $(tag l5)
# E # E

Просмотреть файл

@ -77,7 +77,7 @@ save_tag h2 unique_commit g4 tree -p g2
save_tag g3 unique_commit g5 tree -p g2 save_tag g3 unique_commit g5 tree -p g2
save_tag g4 unique_commit g6 tree -p g3 -p h2 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 " "' <<EOF test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
19 19