From: Pavel Roskin <proski@gnu.org>
To: git <git@vger.kernel.org>, Petr Baudis <pasky@suse.cz>
Subject: [PATCH]: cogito testsuite: use git-symbolic-ref
Date: Mon, 14 Nov 2005 20:13:00 -0500 [thread overview]
Message-ID: <1132017180.24084.39.camel@dv> (raw)
cogito testsuite fails if git is compiled with USE_SYMLINK_HEAD=0.
To fix it, use git-symbolic-ref instead of readlink.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/t/t9300-seek.sh b/t/t9300-seek.sh
index d3fed11..a6f3a65 100755
--- a/t/t9300-seek.sh
+++ b/t/t9300-seek.sh
@@ -30,7 +30,7 @@ test_expect_success 'seeking to the firs
test_expect_success 'we should have .git/head-name == master' \
"[ $(cat .git/head-name) = master ]"
test_expect_success 'current branch should be cg-seek-point' \
- "[ $(basename $(readlink .git/HEAD)) = cg-seek-point ]"
+ "[ $(basename $(git-symbolic-ref HEAD)) = cg-seek-point ]"
test_expect_success 'current commit should be commit1' \
"[ $(cg-object-id -c) = $commit1 ]"
@@ -47,14 +47,16 @@ test_expect_success 'identical should be
test_expect_success 'seeking to the second commit' \
"cg-seek $commit2"
test_expect_success 'we should not unseeked properly' \
- "([ -e .git/head-name ] && [ $(basename $(readlink .git/HEAD)) = cg-seek-point ])"
+ "([ -e .git/head-name ] &&
+ [ $(basename $(git-symbolic-ref HEAD)) = cg-seek-point ])"
test_expect_success 'current commit should be commit2' \
"[ $(cg-object-id -c) = $commit2 ]"
test_expect_success 'seeking to the last (well, still second) commit' \
"cg-seek master"
test_expect_success 'we should be unseeked properly' \
- "([ ! -e .git/head-name ] && [ $(basename $(readlink .git/HEAD)) = master ])"
+ "([ ! -e .git/head-name ] &&
+ [ $(basename $(git-symbolic-ref HEAD)) = master ])"
test_expect_success 'current commit should be commit2' \
"[ $(cg-object-id -c) = $commit2 ]"
@@ -88,7 +90,8 @@ test_expect_success 'identical should be
test_expect_success 'unseeking' \
"cg-seek"
test_expect_success 'we should be unseeked properly' \
- "([ ! -e .git/head-name ] && [ $(basename $(readlink .git/HEAD)) = master ])"
+ "([ ! -e .git/head-name ] &&
+ [ $(basename $(git-symbolic-ref HEAD)) = master ])"
test_expect_success 'current commit should be commit2' \
"[ $(cg-object-id -c) = $commit2 ]"
--
Regards,
Pavel Roskin
reply other threads:[~2005-11-15 1:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1132017180.24084.39.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).