From: Wang Hui <Hui.Wang@windriver.com>
To: <gitster@pobox.com>, <git@vger.kernel.org>, <tali@admingilde.org>
Subject: [PATCH v2 5/5] t5710: add testcase for multi-level relative alternates
Date: Tue, 6 Sep 2011 18:24:05 +0800 [thread overview]
Message-ID: <1315304645-12009-6-git-send-email-Hui.Wang@windriver.com> (raw)
In-Reply-To: <1315304645-12009-5-git-send-email-Hui.Wang@windriver.com>
From: Hui Wang <Hui.Wang@windriver.com>
Since we removed "relative alternates only possible for current dir"
limitation, it is needed to change an existing testcase to make it
pass for the relative path at the second level alternates.
Add a new testcase to make it pass when it work at a 5-level relative
alternates repository and make it fail when it work at a 6-level
relative alternates repository.
Signed-off-by: Hui Wang <Hui.Wang@windriver.com>
---
t/t5710-info-alternate.sh | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index ef7127c..a606a94 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -102,9 +102,26 @@ test_valid_repo'
cd "$base_dir"
test_expect_success \
- 'that relative alternate is only possible for current dir' '
+ 'that relative alternate is possible for none current dir' '
cd D &&
- ! (test_valid_repo)
+ test_valid_repo
+'
+
+cd "$base_dir"
+
+test_expect_success 'allow maxium 5 level relative alternate' \
+'echo "" > A/.git/objects/info/alternates &&
+echo "../../../A/.git/objects" > B/.git/objects/info/alternates &&
+echo "../../../B/.git/objects" > C/.git/objects/info/alternates &&
+echo "../../../C/.git/objects" > D/.git/objects/info/alternates &&
+echo "../../../D/.git/objects" > E/.git/objects/info/alternates &&
+echo "../../../E/.git/objects" > F/.git/objects/info/alternates &&
+echo "../../../F/.git/objects" > G/.git/objects/info/alternates &&
+cd F &&
+test_valid_repo &&
+cd ../G &&
+git fsck --full > fsck.err 2>&1 &&
+test `wc -l < fsck.err` != 0
'
cd "$base_dir"
--
1.6.3.1
next prev parent reply other threads:[~2011-09-06 10:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 10:24 [PATCH v2 0/5] sha1_file: remove only current repository can have relative path limitation Wang Hui
2011-09-06 10:24 ` [PATCH v2 1/5] sha1_file cleanup: remove redundant variable check Wang Hui
2011-09-06 10:24 ` [PATCH v2 2/5] sha1_file: remove a buggy value setting Wang Hui
2011-09-06 10:24 ` [PATCH v2 3/5] sha1_file: improve directories comparison method Wang Hui
2011-09-06 10:24 ` [PATCH v2 4/5] sha1_file: remove relative entries limitation Wang Hui
2011-09-06 10:24 ` Wang Hui [this message]
2011-09-06 16:32 ` [PATCH v2 3/5] sha1_file: improve directories comparison method Junio C Hamano
2011-09-06 16:26 ` [PATCH v2 2/5] sha1_file: remove a buggy value setting Junio C Hamano
2011-09-07 9:55 ` wanghui
2011-09-06 16:59 ` [PATCH v2 1/5] sha1_file cleanup: remove redundant variable check Junio C Hamano
2011-09-07 10:24 ` wanghui
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=1315304645-12009-6-git-send-email-Hui.Wang@windriver.com \
--to=hui.wang@windriver.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tali@admingilde.org \
/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).