{"thread":{"id":"14626","subject":"[PATCH 09/12] tests for sparse clone","startedAt":"2008-07-23T14:57:28Z","lastAt":"2008-07-23T14:57:28Z","messageCount":1,"participants":["Nguyễn Thái Ngọc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":12},"messages":[{"id":"84515","messageId":"20080723145728.GA29144@laptop","threadId":"14626","inReplyTo":null,"subject":"[PATCH 09/12] tests for sparse clone","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2008-07-23T14:57:28Z","receivedAt":"2008-07-23T14:57:28Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n t/t5703-clone-sparse.sh |   40 ++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 40 insertions(+), 0 deletions(-)\n create mode 100755 t/t5703-clone-sparse.sh\n\ndiff --git a/t/t5703-clone-sparse.sh b/t/t5703-clone-sparse.sh\nnew file mode 100755\nindex 0000000..012ead0\n--- /dev/null\n+++ b/t/t5703-clone-sparse.sh\n@@ -0,0 +1,40 @@\n+#!/bin/sh\n+\n+test_description='sparse clone'\n+\n+. ./test-lib.sh\n+\n+test_expect_success setup '\n+\trm -fr .git &&\n+\ttest_create_repo src &&\n+\t(\n+\t\tcd src\n+\t\tmkdir -p work/sub/dir\n+\t\ttouch untracked tracked modified added\n+\t\ttouch work/untracked work/tracked work/modified work/added\n+\t\tgit add tracked work/tracked\n+\t\tgit add modified work/modified\n+\t\tgit commit -m initial\n+\t)\n+\n+'\n+\n+test_expect_success 'sparse clone incompatible with --bare' '\n+\trm -fr dst &&\n+\ttest_must_fail git clone --path=work --bare src dst\n+'\n+\n+test_expect_success 'sparse clone incompatible with --no-checkout' '\n+\trm -fr dst &&\n+\ttest_must_fail git clone --path=work -n src dst\n+'\n+\n+test_expect_success 'clone with --path' '\n+\trm -fr dst &&\n+\tgit clone --path=work src dst &&\n+\tcd dst &&\n+\ttest work = \"$(git rev-parse --show-sparse-prefix)\" &&\n+\ttest -z \"$(git ls-files | grep -v ^work/)\"\n+'\n+\n+test_done\n-- \n1.5.5.GIT\n"}]}