{"thread":{"id":"14627","subject":"[PATCH 07/12] tests for sparse checkout, worktree protection","startedAt":"2008-07-23T14:57:03Z","lastAt":"2008-07-23T14:57:03Z","messageCount":1,"participants":["Nguyễn Thái Ngọc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":12},"messages":[{"id":"84516","messageId":"20080723145703.GA29123@laptop","threadId":"14627","inReplyTo":null,"subject":"[PATCH 07/12] tests for sparse checkout, worktree protection","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2008-07-23T14:57:03Z","receivedAt":"2008-07-23T14:57:03Z","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/t2302-sparse-worktree.sh                 |  113 ++++++++++++++\n t/t2302/add-u.expected                     |    1 +\n t/t2302/add.expected                       |    2 +\n t/t2302/commit.expected                    |   14 ++\n t/t2302/diff-1.expected                    |    7 +\n t/t2302/diff-cc.expected                   |    9 +\n t/t2302/grep-work.expected                 |    2 +\n t/t2302/grep.expected                      |    2 +\n t/t2302/ls-files.expected                  |    2 +\n t/t2303-sparse-worktree-apply.sh           |   62 ++++++++\n t/t2303/apply-initial.patch                |   14 ++\n t/t2303/apply-inside.patch                 |    7 +\n t/t2303/apply-leading-dirs.patch           |    3 +\n t/t2303/apply-outside.patch                |    7 +\n t/t2303/apply-remove.patch                 |    7 +\n t/t2303/apply-rename.expected              |   13 ++\n t/t2303/apply-rename.patch                 |    4 +\n t/t2304-sparse-worktree-merge-recursive.sh |  233 ++++++++++++++++++++++++++++\n 18 files changed, 502 insertions(+), 0 deletions(-)\n create mode 100755 t/t2302-sparse-worktree.sh\n create mode 100644 t/t2302/add-u.expected\n create mode 100644 t/t2302/add.expected\n create mode 100644 t/t2302/commit.expected\n create mode 100644 t/t2302/diff-1.expected\n create mode 100644 t/t2302/diff-cc.expected\n create mode 100644 t/t2302/grep-work.expected\n create mode 100644 t/t2302/grep.expected\n create mode 100644 t/t2302/ls-files.expected\n create mode 100755 t/t2303-sparse-worktree-apply.sh\n create mode 100644 t/t2303/apply-initial.patch\n create mode 100644 t/t2303/apply-inside.patch\n create mode 100644 t/t2303/apply-leading-dirs.patch\n create mode 100644 t/t2303/apply-outside.patch\n create mode 100644 t/t2303/apply-remove.patch\n create mode 100644 t/t2303/apply-rename.expected\n create mode 100644 t/t2303/apply-rename.patch\n create mode 100755 t/t2304-sparse-worktree-merge-recursive.sh\n\ndiff --git a/t/t2302-sparse-worktree.sh b/t/t2302-sparse-worktree.sh\nnew file mode 100755\nindex 0000000..0aaee3e\n--- /dev/null\n+++ b/t/t2302-sparse-worktree.sh\n@@ -0,0 +1,113 @@\n+#!/bin/sh\n+\n+test_description='sparse checkout -- worktree update\n+\n+This test makes sure all commands that will not write\n+worktree outside sparse prefix, once set.\n+'\n+. ./test-lib.sh\n+\n+test_expect_success 'setup' '\n+\ttest_tick &&\n+\tmkdir work &&\n+\techo one > tracked &&\n+\tcp tracked work/tracked &&\n+\tcp tracked untracked &&\n+\tcp tracked work/untracked &&\n+\tcp tracked modified &&\n+\tcp tracked work/modified &&\n+\tgit add tracked modified work/tracked work/modified &&\n+\techo two >> modified &&\n+\techo two >> work/modified &&\n+\tgit commit -m initial &&\n+\tgit config core.sparsecheckout work'\n+\n+test_expect_success 'rev-parse --show-sparse-prefix' '\n+\ttest \"$(git rev-parse --show-sparse-prefix)\" = \"work\"\n+'\n+\n+test_expect_success 'ls-files' '\n+\tgit ls-files | cmp ../t2302/ls-files.expected &&\n+\ttest \"$(git ls-files -o)\" = work/untracked &&\n+\ttest \"$(git ls-files -o .)\" = work/untracked &&\n+\ttest \"$(git ls-files -m)\" = work/modified\n+\n+'\n+\n+test_expect_success 'grep' 'git grep -l --no-external-grep one | cmp ../t2302/grep.expected'\n+\n+test_expect_success 'grep' '\n+\t(\n+\tcd work &&\n+\tgit grep -l --no-external-grep one | cmp ../../t2302/grep-work.expected\n+\t)\n+'\n+\n+test_expect_success 'checkout-index' '! git checkout-index tracked'\n+\n+test_expect_success 'checkout-index -a' '\n+\tmv work/modified work/modified.old &&\n+\tgit checkout-index -a &&\n+\tmv work/modified.old work/modified\n+'\n+\n+test_expect_success 'checkout tracked' '! git checkout tracked'\n+\n+test_expect_success 'checkout work/tracked' 'rm work/tracked && git checkout work/tracked'\n+\n+test_expect_success 'clean' 'test \"$(git clean -n)\" = \"Would remove work/untracked\"'\n+\n+test_expect_success 'rm' '! git rm tracked && test -f tracked'\n+\n+test_expect_success 'add' '\n+\tgit add -n . | cmp ../t2302/add.expected &&\n+\tgit add -n -u | cmp ../t2302/add-u.expected &&\n+\t! git add -n modified\n+'\n+\n+test_expect_success 'commit' '\n+\ttest_tick &&\n+\techo one > work/one &&\n+\tgit add work/one\n+\techo two >> work/one &&\n+\tgit commit -m one work/one &&\n+\tgit show HEAD > commit.result &&\n+\tcmp commit.result ../t2302/commit.expected &&\n+\trm commit.result\n+'\n+\n+null_sha1=0000000000000000000000000000000000000000\n+one_sha1=$(echo one|git hash-object --stdin)\n+onethree_sha1=$(echo -e \"one\\nthree\"|git hash-object -w --stdin)\n+onefour_sha1=$(echo -e \"one\\nfour\"|git hash-object -w --stdin)\n+\n+diff_expected=\":100644 100644 $one_sha1 $null_sha1 M\twork/modified\"\n+external_diff_pattern=\"^work/modified [^ ]* $one_sha1 100644 work/modified $null_sha1 100644\\$\"\n+\n+cat >index.info <<EOF\n+0 $null_sha1\twork/modified\n+100644 $onethree_sha1 2\twork/modified\n+100644 $onefour_sha1 3\twork/modified\n+EOF\n+\n+test_expect_success 'diff-files' '\n+\ttest \"$(git diff-files)\" = \"$diff_expected\" &&\n+\ttest \"$(git diff-files -- work/modified)\" = \"$diff_expected\"\n+\tcp .git/index .git/index.save &&\n+\tgit update-index --index-info < index.info &&\n+\tgit diff-files --cc | diff - ../t2302/diff-cc.expected &&\n+\tmv .git/index.save .git/index\n+'\n+\n+test_expect_success 'diff-index' '\n+\ttest \"$(git diff-index HEAD)\" = \"$diff_expected\"\n+'\n+\n+test_expect_success 'diff' '\n+\tgit diff HEAD | cmp ../t2302/diff-1.expected &&\n+\tgit diff | cmp ../t2302/diff-1.expected &&\n+\tGIT_EXTERNAL_DIFF=echo git diff --ext-diff HEAD | grep -q \"$external_diff_pattern\" &&\n+\tGIT_EXTERNAL_DIFF=echo git diff --ext-diff | grep -q \"$external_diff_pattern\" \n+'\n+\n+test_done\ndiff --git a/t/t2302/add-u.expected b/t/t2302/add-u.expected\nnew file mode 100644\nindex 0000000..e0d6f54\n--- /dev/null\n+++ b/t/t2302/add-u.expected\n@@ -0,0 +1 @@\n+add 'work/modified'\ndiff --git a/t/t2302/add.expected b/t/t2302/add.expected\nnew file mode 100644\nindex 0000000..4ee7b0d\n--- /dev/null\n+++ b/t/t2302/add.expected\n@@ -0,0 +1,2 @@\n+add 'work/modified'\n+add 'work/untracked'\ndiff --git a/t/t2302/commit.expected b/t/t2302/commit.expected\nnew file mode 100644\nindex 0000000..7e629aa\n--- /dev/null\n+++ b/t/t2302/commit.expected\n@@ -0,0 +1,14 @@\n+commit 33ce2cea204feebac3994cd4520cca60657e65de\n+Author: A U Thor <author@example.com>\n+Date:   Thu Apr 7 15:14:13 2005 -0700\n+\n+    one\n+\n+diff --git a/work/one b/work/one\n+new file mode 100644\n+index 0000000..814f4a4\n+--- /dev/null\n++++ b/work/one\n+@@ -0,0 +1,2 @@\n++one\n++two\ndiff --git a/t/t2302/diff-1.expected b/t/t2302/diff-1.expected\nnew file mode 100644\nindex 0000000..67be4fb\n--- /dev/null\n+++ b/t/t2302/diff-1.expected\n@@ -0,0 +1,7 @@\n+diff --git a/work/modified b/work/modified\n+index 5626abf..814f4a4 100644\n+--- a/work/modified\n++++ b/work/modified\n+@@ -1 +1,2 @@\n+ one\n++two\ndiff --git a/t/t2302/diff-cc.expected b/t/t2302/diff-cc.expected\nnew file mode 100644\nindex 0000000..8ca66dd\n--- /dev/null\n+++ b/t/t2302/diff-cc.expected\n@@ -0,0 +1,9 @@\n+diff --cc work/modified\n+index 4c7442b,a9c7698..0000000\n+--- a/work/modified\n++++ b/work/modified\n+@@@ -1,2 -1,2 +1,2 @@@\n+  one\n+- three\n+ -four\n+++two\ndiff --git a/t/t2302/grep-work.expected b/t/t2302/grep-work.expected\nnew file mode 100644\nindex 0000000..c081ddd\n--- /dev/null\n+++ b/t/t2302/grep-work.expected\n@@ -0,0 +1,2 @@\n+modified\n+tracked\ndiff --git a/t/t2302/grep.expected b/t/t2302/grep.expected\nnew file mode 100644\nindex 0000000..4ddbe70\n--- /dev/null\n+++ b/t/t2302/grep.expected\n@@ -0,0 +1,2 @@\n+work/modified\n+work/tracked\ndiff --git a/t/t2302/ls-files.expected b/t/t2302/ls-files.expected\nnew file mode 100644\nindex 0000000..4ddbe70\n--- /dev/null\n+++ b/t/t2302/ls-files.expected\n@@ -0,0 +1,2 @@\n+work/modified\n+work/tracked\ndiff --git a/t/t2303-sparse-worktree-apply.sh b/t/t2303-sparse-worktree-apply.sh\nnew file mode 100755\nindex 0000000..4aeaf53\n--- /dev/null\n+++ b/t/t2303-sparse-worktree-apply.sh\n@@ -0,0 +1,62 @@\n+#!/bin/sh\n+\n+test_description='git-apply in subtree checkout'\n+\n+. ./test-lib.sh\n+\n+mkdir work\n+\n+test_apply() {\n+\ttest_expect_success \"$1\" '\n+\t\tgit checkout . &&\n+\t\tgit config core.sparsecheckout work &&\n+\t\tgit apply ../t2303/apply-'$2'.patch &&\n+\t\tgit config --unset core.sparsecheckout &&\n+\t\tgit diff > apply.result &&\n+\t\tcmp apply.result ../t2303/apply-'$2'.patch\n+\t'\n+}\n+\n+test_expect_success 'apply on empty tree' '\n+\t\tgit config core.sparsecheckout work &&\n+\t\t! git apply ../t2303/apply-initial.patch &&\n+\t\tgit config --unset core.sparsecheckout\n+'\n+\n+test_expect_success 'apply successfully without sparse checkout' '\n+\tgit apply ../t2303/apply-initial.patch &&\n+\tgit apply --cached ../t2303/apply-initial.patch\n+'\n+\n+test_expect_success 'apply on modified tree outside' '\n+\tgit checkout . &&\n+\tgit config core.sparsecheckout work &&\n+\t! git apply ../t2303/apply-outside.patch &&\n+\tgit config --unset core.sparsecheckout\n+'\n+\n+test_apply 'apply on modified tree' inside\n+\n+test_apply 'apply removing file' remove\n+\n+test_expect_success 'apply creating leading directories' '\n+\tgit config core.sparsecheckout work &&\n+\tgit apply ../t2303/apply-leading-dirs.patch &&\n+\tgit config --unset core.sparsecheckout &&\n+\ttest -f work/for/me/now\n+'\n+\n+test_expect_success 'apply renaming file' '\n+\tgit checkout . &&\n+\ttouch a &&\n+\tempty_sha1=$(git hash-object -w a) &&\n+\trm a &&\n+\tgit update-index --add --cacheinfo 100644 $empty_sha1 work/two &&\n+\tgit config core.sparsecheckout work &&\n+\tgit apply ../t2303/apply-rename.patch &&\n+\tgit config --unset core.sparsecheckout &&\n+\tgit diff > apply.result &&\n+\tcmp apply.result ../t2303/apply-rename.expected\n+'\n+\n+test_done\ndiff --git a/t/t2303/apply-initial.patch b/t/t2303/apply-initial.patch\nnew file mode 100644\nindex 0000000..72bfd82\n--- /dev/null\n+++ b/t/t2303/apply-initial.patch\n@@ -0,0 +1,14 @@\n+diff --git a/one b/one\n+new file mode 100644\n+index 0000000..5626abf\n+--- /dev/null\n++++ b/one\n+@@ -0,0 +1 @@\n++one\n+diff --git a/work/one b/work/one\n+new file mode 100644\n+index 0000000..da327ae\n+--- /dev/null\n++++ b/work/one\n+@@ -0,0 +1 @@\n++work/one\ndiff --git a/t/t2303/apply-inside.patch b/t/t2303/apply-inside.patch\nnew file mode 100644\nindex 0000000..4f5c310\n--- /dev/null\n+++ b/t/t2303/apply-inside.patch\n@@ -0,0 +1,7 @@\n+diff --git a/work/one b/work/one\n+index da327ae..6317017 100644\n+--- a/work/one\n++++ b/work/one\n+@@ -1 +1,2 @@\n+ work/one\n++more\ndiff --git a/t/t2303/apply-leading-dirs.patch b/t/t2303/apply-leading-dirs.patch\nnew file mode 100644\nindex 0000000..b55809f\n--- /dev/null\n+++ b/t/t2303/apply-leading-dirs.patch\n@@ -0,0 +1,3 @@\n+diff --git a/work/for/me/now b/work/for/me/now\n+new file mode 100644\n+index 0000000..e69de29\ndiff --git a/t/t2303/apply-outside.patch b/t/t2303/apply-outside.patch\nnew file mode 100644\nindex 0000000..8a8d625\n--- /dev/null\n+++ b/t/t2303/apply-outside.patch\n@@ -0,0 +1,7 @@\n+diff --git a/one b/one\n+index 5626abf..9a72323 100644\n+--- a/one\n++++ b/one\n+@@ -1 +1,2 @@\n+ one\n++more\ndiff --git a/t/t2303/apply-remove.patch b/t/t2303/apply-remove.patch\nnew file mode 100644\nindex 0000000..781c743\n--- /dev/null\n+++ b/t/t2303/apply-remove.patch\n@@ -0,0 +1,7 @@\n+diff --git a/work/one b/work/one\n+deleted file mode 100644\n+index da327ae..0000000\n+--- a/work/one\n++++ /dev/null\n+@@ -1 +0,0 @@\n+-work/one\ndiff --git a/t/t2303/apply-rename.expected b/t/t2303/apply-rename.expected\nnew file mode 100644\nindex 0000000..d19f719\n--- /dev/null\n+++ b/t/t2303/apply-rename.expected\n@@ -0,0 +1,13 @@\n+diff --git a/work/one b/work/one\n+deleted file mode 100644\n+index da327ae..0000000\n+--- a/work/one\n++++ /dev/null\n+@@ -1 +0,0 @@\n+-work/one\n+diff --git a/work/two b/work/two\n+index e69de29..da327ae 100644\n+--- a/work/two\n++++ b/work/two\n+@@ -0,0 +1 @@\n++work/one\ndiff --git a/t/t2303/apply-rename.patch b/t/t2303/apply-rename.patch\nnew file mode 100644\nindex 0000000..6f21947\n--- /dev/null\n+++ b/t/t2303/apply-rename.patch\n@@ -0,0 +1,4 @@\n+diff --git a/work/one b/work/two\n+similarity index 100%\n+rename from work/one\n+rename to work/two\ndiff --git a/t/t2304-sparse-worktree-merge-recursive.sh b/t/t2304-sparse-worktree-merge-recursive.sh\nnew file mode 100755\nindex 0000000..b1708d4\n--- /dev/null\n+++ b/t/t2304-sparse-worktree-merge-recursive.sh\n@@ -0,0 +1,233 @@\n+#!/bin/sh\n+\n+test_description='merge-recursive backend test'\n+\n+. ./test-lib.sh\n+\n+test_expect_success 'setup 1' '\n+\n+\techo hello >a &&\n+\to0=$(git hash-object a) &&\n+\tcp a b &&\n+\tcp a c &&\n+\tmkdir d &&\n+\tcp a d/e &&\n+\n+\ttest_tick &&\n+\tgit add a b c d/e &&\n+\tgit commit -m initial &&\n+\tc0=$(git rev-parse --verify HEAD) &&\n+\tgit branch noconflict &&\n+\tgit branch conflict &&\n+\tgit branch conflict-inside &&\n+\n+\techo hello >>a &&\n+\tcp a d/e &&\n+\to1=$(git hash-object a) &&\n+\n+\tgit add a d/e &&\n+\n+\ttest_tick &&\n+\tgit commit -m \"master modifies a and d/e\" &&\n+\tc1=$(git rev-parse --verify HEAD) &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o1\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o1\td/e\"\n+\t\techo \"100644 $o1 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o1 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'setup 2' '\n+\n+\trm -rf [abcd] &&\n+\tgit checkout conflict &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o0\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o0\td/e\"\n+\t\techo \"100644 $o0 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual &&\n+\n+\techo goodbye >>a &&\n+\to2=$(git hash-object a) &&\n+\n+\tgit add a &&\n+\n+\ttest_tick &&\n+\tgit commit -m \"conflict modifies a\" &&\n+\tc2=$(git rev-parse --verify HEAD) &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o2\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o0\td/e\"\n+\t\techo \"100644 $o2 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'setup 3' '\n+\n+\trm -rf [abcd] &&\n+\tgit checkout noconflict &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o0\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o0\td/e\"\n+\t\techo \"100644 $o0 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual &&\n+\n+\techo hello >>a &&\n+\to3=$(git hash-object a) &&\n+\n+\tgit add a &&\n+\n+\ttest_tick &&\n+\tgit commit -m \"noconflict modifies a\" &&\n+\tc3=$(git rev-parse --verify HEAD) &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o3\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o0\td/e\"\n+\t\techo \"100644 $o3 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'setup 4' '\n+\n+\trm -rf [abcd] &&\n+\tgit checkout conflict-inside &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o0\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o0\td/e\"\n+\t\techo \"100644 $o0 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual &&\n+\n+\tmkdir d &&\n+\techo goodbye >>d/e &&\n+\to4=$(git hash-object d/e) &&\n+\n+\tgit add d/e &&\n+\n+\ttest_tick &&\n+\tgit commit -m \"conflict-inside modifies d/e\" &&\n+\tc4=$(git rev-parse --verify HEAD) &&\n+\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t(\n+\t\techo \"100644 blob $o0\ta\"\n+\t\techo \"100644 blob $o0\tb\"\n+\t\techo \"100644 blob $o0\tc\"\n+\t\techo \"100644 blob $o4\td/e\"\n+\t\techo \"100644 $o0 0\ta\"\n+\t\techo \"100644 $o0 0\tb\"\n+\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o4 0\td/e\"\n+\t) >expected &&\n+\ttest_cmp expected actual\n+'\n+\n+echo \"gitdir: $(pwd)/.git\" > gitfile\n+\n+test_expect_success 'merge-recursive conflict inside' '\n+\n+\trm -fr [abcd] &&\n+\tgit checkout -f \"$c4\" &&\n+\n+\tcp gitfile d/.git && cd d/\n+\tgit config core.sparsecheckout d\n+\tgit-merge-recursive \"$c0\" -- \"$c4\" \"$c1\"\n+\tstatus=$?\n+\tgit config --unset core.sparsecheckout\n+\trm .git && cd ..\n+\tcase \"$status\" in\n+\t1)\n+\t\t: happy\n+\t\t;;\n+\t*)\n+\t\techo >&2 \"why status $status!!!\"\n+\t\tfalse\n+\t\t;;\n+\tesac\n+'\n+\n+test_expect_success 'merge-recursive no conflict outside' '\n+\n+\trm -fr [abcd] &&\n+\tgit checkout -f \"$c3\" &&\n+\n+\tcp gitfile d/.git && cd d\n+\tgit config core.sparsecheckout d\n+\tgit-merge-recursive \"$c0\" -- \"$c3\" \"$c1\"\n+\tstatus=$?\n+\tgit config --unset core.sparsecheckout\n+\trm .git && cd ..\n+\tcase \"$status\" in\n+\t0)\n+\t\t: happy\n+\t\t;;\n+\t*)\n+\t\techo >&2 \"why status $status!!!\"\n+\t\tfalse\n+\t\t;;\n+\tesac\n+'\n+\n+test_expect_success 'merge-recursive conflict outside' '\n+\n+\trm -fr [abcd] &&\n+\tgit checkout -f \"$c2\" &&\n+\n+\tcp gitfile d/.git && cd d\n+\tgit config core.sparsecheckout d\n+\tgit-merge-recursive \"$c0\" -- \"$c2\" \"$c1\"\n+\tstatus=$?\n+\tgit config --unset core.sparsecheckout\n+\trm .git && cd ..\n+\tcase \"$status\" in\n+\t128)\n+\t\t: happy\n+\t\t;;\n+\t*)\n+\t\techo >&2 \"why status $status!!!\"\n+\t\tfalse\n+\t\t;;\n+\tesac\n+'\n+\n+test_done\n-- \n1.5.5.GIT\n"}]}