From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Cc: skillzero@gmail.com, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 2/3] t1011: fix sparse-checkout initialization and add new file
Date: Mon, 2 May 2011 19:47:43 +0700 [thread overview]
Message-ID: <1304340464-14829-2-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1304340464-14829-1-git-send-email-pclouds@gmail.com>
Do not append to $GIT_DIR/info/sparse-checkout at each test, overwrite
it instead.
Also add sub/addedtoo for more complex tests later on
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
t/t1011-read-tree-sparse-checkout.sh | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index de84e35..3f9d66f 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -17,19 +17,21 @@ test_expect_success 'setup' '
cat >expected <<-\EOF &&
100644 77f0ba1734ed79d12881f81b36ee134de6a3327b 0 init.t
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/added
+ 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/addedtoo
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 subsub/added
EOF
cat >expected.swt <<-\EOF &&
H init.t
H sub/added
+ H sub/addedtoo
H subsub/added
EOF
test_commit init &&
echo modified >>init.t &&
mkdir sub subsub &&
- touch sub/added subsub/added &&
- git add init.t sub/added subsub/added &&
+ touch sub/added sub/addedtoo subsub/added &&
+ git add init.t sub/added sub/addedtoo subsub/added &&
git commit -m "modified and added" &&
git tag top &&
git rm sub/added &&
@@ -83,6 +85,7 @@ test_expect_success 'match directories with trailing slash' '
cat >expected.swt-noinit <<-\EOF &&
S init.t
H sub/added
+ H sub/addedtoo
S subsub/added
EOF
@@ -95,7 +98,7 @@ test_expect_success 'match directories with trailing slash' '
'
test_expect_success 'match directories without trailing slash' '
- echo sub >>.git/info/sparse-checkout &&
+ echo sub >.git/info/sparse-checkout &&
git read-tree -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-noinit result &&
@@ -104,7 +107,7 @@ test_expect_success 'match directories without trailing slash' '
'
test_expect_success 'match directory pattern' '
- echo "s?b" >>.git/info/sparse-checkout &&
+ echo "s?b" >.git/info/sparse-checkout &&
git read-tree -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-noinit result &&
@@ -116,6 +119,7 @@ test_expect_success 'checkout area changes' '
cat >expected.swt-nosub <<-\EOF &&
H init.t
S sub/added
+ S sub/addedtoo
S subsub/added
EOF
--
1.7.4.74.g639db
next prev parent reply other threads:[~2011-05-02 12:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 12:47 [PATCH 1/3] t3700: note a .gitignore matching fault Nguyễn Thái Ngọc Duy
2011-05-02 12:47 ` Nguyễn Thái Ngọc Duy [this message]
2011-05-02 12:47 ` [PATCH 3/3] sparse checkout: do not eagerly decide the fate for whole directory Nguyễn Thái Ngọc Duy
2011-05-03 2:14 ` Thiago Farina
2011-05-03 4:43 ` Nguyen Thai Ngoc Duy
2011-05-10 23:37 ` Junio C Hamano
2011-05-11 12:03 ` Nguyen Thai Ngoc Duy
[not found] ` <1304955781-13566-1-git-send-email-pclouds@gmail.com>
2011-05-09 22:22 ` Junio C Hamano
2011-05-02 12:55 ` [PATCH 1/3] t3700: note a .gitignore matching fault Nguyễn Thái Ngọc Duy
2011-05-02 15:01 ` Johannes Sixt
2011-05-02 15:52 ` Nguyen Thai Ngoc Duy
2011-05-03 17:56 ` Junio C Hamano
2011-05-03 23:43 ` Nguyen Thai Ngoc Duy
2011-05-03 23:57 ` Junio C Hamano
2011-05-04 0:41 ` Nguyen Thai Ngoc Duy
2011-05-04 1:05 ` Nguyen Thai Ngoc Duy
2011-05-04 6:06 ` Johannes Sixt
2011-05-04 6:22 ` Nguyen Thai Ngoc Duy
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=1304340464-14829-2-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=skillzero@gmail.com \
/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).