{"thread":{"id":"1712","subject":"[PATCH 3/2] Remove emu23, fix entry order","startedAt":"2005-09-02T06:05:43Z","lastAt":"2005-09-02T06:36:19Z","messageCount":2,"participants":["Daniel Barkalow","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"8001","messageId":"Pine.LNX.4.63.0509020202030.23242@iabervon.org","threadId":"1712","inReplyTo":null,"subject":"[PATCH 3/2] Remove emu23, fix entry order","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-09-02T06:05:43Z","receivedAt":"2005-09-02T06:05:43Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"A few things to improve testing. I'll clean up the series as a whole once \nit's tested.\n\nThis removes the emu23 tests; I think that the only DF conflict tests were \nin that set, however, so these should be fished out and added to something \nelse.\n\nSigned-off-by: Daniel Barkalow <barkalow@iabervon.org>\n\n---\n\n read-tree.c                       |   89 +++-----\n t/t1005-read-tree-m-2way-emu23.sh |  422 -------------------------------------\n 2 files changed, 37 insertions(+), 474 deletions(-)\n delete mode 100755 t/t1005-read-tree-m-2way-emu23.sh\n\n63092a4dfb2042e8fc21260b2f315b01e9163940\ndiff --git a/read-tree.c b/read-tree.c\n--- a/read-tree.c\n+++ b/read-tree.c\n@@ -9,7 +9,6 @@\n #include \"tree.h\"\n \n static int merge = 0;\n-static int emu23 = 0;\n static int update = 0;\n \n static struct object_list *trees = NULL;\n@@ -19,19 +18,39 @@ typedef int (*merge_fn_t)(struct cache_e\n \t\t\t  int df_conflicts_2,\n \t\t\t  int df_conflicts_3);\n \n+static int entcmp(char *name1, int dir1, char *name2, int dir2)\n+{\n+\tint len1 = strlen(name1);\n+\tint len2 = strlen(name2);\n+\tint len = len1 < len2 ? len1 : len2;\n+\tint ret = memcmp(name1, name2, len);\n+\tunsigned char c1, c2;\n+\tif (ret)\n+\t\treturn ret;\n+\tc1 = name1[len];\n+\tc2 = name2[len];\n+\tif (!c1 && dir1)\n+\t\tc1 = '/';\n+\tif (!c2 && dir2)\n+\t\tc2 = '/';\n+\tret = (c1 < c2) ? -1 : (c1 > c2) ? 1 : 0;\n+\tif (c1 && c2 && !ret)\n+\t\tret = len1 - len2;\n+\treturn ret;\n+}\n+\n static int unpack_trees_rec(struct tree_entry_list **posns, int len,\n \t\t\t    const char *base, merge_fn_t fn, \n \t\t\t    int file2, int file3, int *indpos)\n {\n \tint baselen = strlen(base);\n \tint src_size = len + 1;\n-\tif (emu23)\n-\t\tsrc_size++;\n \tif (src_size > 4)\n \t\tsrc_size = 4;\n \tdo {\n \t\tint i;\n \t\tchar *first = NULL;\n+\t\tint firstdir = 0;\n \t\tint pathlen;\n \t\tunsigned ce_size;\n \t\tint dir2 = 0;\n@@ -73,11 +92,23 @@ static int unpack_trees_rec(struct tree_\n \t\t\t}\n \t\t}\n \n+\t\t/*\n+\t\tif (first)\n+\t\t\tprintf(\"%s\\n\", first);\n+\t\t*/\n+\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tif (!posns[i])\n \t\t\t\tcontinue;\n-\t\t\tif (!first || strcmp(first, posns[i]->name) > 0)\n+\t\t\t/*\n+\t\t\tprintf(\"%d %s\\n\", i + 1, posns[i]->name);\n+\t\t\t*/\n+\t\t\tif (!first || entcmp(first, firstdir,\n+\t\t\t\t\t     posns[i]->name, \n+\t\t\t\t\t     posns[i]->directory) > 0) {\n \t\t\t\tfirst = posns[i]->name;\n+\t\t\t\tfirstdir = posns[i]->directory;\n+\t\t\t}\n \t\t}\n \t\t/* No name means we're done */\n \t\tif (!first)\n@@ -94,19 +125,6 @@ static int unpack_trees_rec(struct tree_\n \t\t\t       src_size);\n \t\t\tsrc[0] = active_cache[*indpos];\n \t\t\tremove_cache_entry_at(*indpos);\n-\t\t\tif (emu23) {\n-\t\t\t\t// we need this in stage 2 as well as stage 0\n-\t\t\t\tstruct cache_entry *copy =\n-\t\t\t\t\txmalloc(ce_size);\n-\t\t\t\tmemcpy(copy, src[0], ce_size);\n-\t\t\t\tcopy->ce_flags = \n-\t\t\t\t\tcreate_ce_flags(baselen + pathlen, 2);\n-\t\t\t\tif (dir2 || file2) {\n-\t\t\t\t\tdie(\"cannot merge index and our head tree\");\n-\t\t\t\t}\n-\t\t\t\tsrc[2] = copy;\n-\t\t\t\tsubfile2 = 1;\n-\t\t\t}\n \t\t}\n \n \t\tfor (i = 0; i < len; i++) {\n@@ -125,8 +143,6 @@ static int unpack_trees_rec(struct tree_\n \t\t\t} else {\n \t\t\t\tce_stage = i + merge;\n \t\t\t}\n-\t\t\tif (emu23 && ce_stage == 2)\n-\t\t\t\tce_stage = 3;\n \n \t\t\tif (posns[i]->directory) {\n \t\t\t\tif (!subposns) {\n@@ -137,8 +153,6 @@ static int unpack_trees_rec(struct tree_\n \t\t\t\tparse_tree(posns[i]->item.tree);\n \t\t\t\tsubposns[i] = posns[i]->item.tree->entries;\n \t\t\t\tposns[i] = posns[i]->next;\n-\t\t\t\tif (emu23 && ce_stage == 1)\n-\t\t\t\t\tdir2 = 1;\n \t\t\t\tif (ce_stage == 2)\n \t\t\t\t\tdir2 = 1;\n \t\t\t\tif (ce_stage == 3)\n@@ -168,19 +182,6 @@ static int unpack_trees_rec(struct tree_\n \t\t\t}\n \n \t\t\tmemcpy(ce->sha1, posns[i]->item.any->sha1, 20);\n-\t\t\tif (ce_stage == 1 && emu23 && !src[2]) {\n-\t\t\t\t// we need this in stage 2 as well as stage 1\n-\t\t\t\tstruct cache_entry *copy =\n-\t\t\t\t\txmalloc(ce_size);\n-\t\t\t\tmemcpy(copy, ce, ce_size);\n-\t\t\t\tcopy->ce_flags = \n-\t\t\t\t\tcreate_ce_flags(baselen + pathlen, 2);\n-\t\t\t\tif (dir2 || file2) {\n-\t\t\t\t\tdie(\"cannot merge index and our head tree\");\n-\t\t\t\t}\n-\t\t\t\tsrc[2] = copy;\n-\t\t\t\tsubfile2 = 1;\n-\t\t\t}\n \t\t\tsrc[ce_stage] = ce;\n \t\t\tposns[i] = posns[i]->next;\n \t\t}\n@@ -601,7 +602,6 @@ int main(int argc, char **argv)\n \n \tmerge = 0;\n \treset = 0;\n-\temu23 = 0;\n \tfor (i = 1; i < argc; i++) {\n \t\tconst char *arg = argv[i];\n \n@@ -613,7 +613,7 @@ int main(int argc, char **argv)\n \n \t\t/* This differs from \"-m\" in that we'll silently ignore unmerged entries */\n \t\tif (!strcmp(arg, \"--reset\")) {\n-\t\t\tif (stage || merge || emu23)\n+\t\t\tif (stage || merge)\n \t\t\t\tusage(read_tree_usage);\n \t\t\treset = 1;\n \t\t\tmerge = 1;\n@@ -624,7 +624,7 @@ int main(int argc, char **argv)\n \n \t\t/* \"-m\" stands for \"merge\", meaning we start in stage 1 */\n \t\tif (!strcmp(arg, \"-m\")) {\n-\t\t\tif (stage || merge || emu23)\n+\t\t\tif (stage || merge)\n \t\t\t\tusage(read_tree_usage);\n \t\t\tif (read_cache_unmerged())\n \t\t\t\tdie(\"you need to resolve your current index first\");\n@@ -633,16 +633,6 @@ int main(int argc, char **argv)\n \t\t\tcontinue;\n \t\t}\n \n-\t\t/* \"-emu23\" uses 3-way merge logic to perform fast-forward */\n-\t\tif (!strcmp(arg, \"--emu23\")) {\n-\t\t\tif (stage || merge || emu23)\n-\t\t\t\tusage(read_tree_usage);\n-\t\t\tif (read_cache_unmerged())\n-\t\t\t\tdie(\"you need to resolve your current index first\");\n-\t\t\tmerge = emu23 = stage = 1;\n-\t\t\tcontinue;\n-\t\t}\n-\n \t\tif (get_sha1(arg, sha1) < 0)\n \t\t\tusage(read_tree_usage);\n \t\tif (list_tree(sha1) < 0)\n@@ -660,12 +650,7 @@ int main(int argc, char **argv)\n \n \t\tif (stage < 2)\n \t\t\tdie(\"just how do you expect me to merge %d trees?\", stage-1);\n-\t\tif (emu23 && stage != 3)\n-\t\t\tdie(\"--emu23 takes only two trees\");\n \t\tfn = merge_function[stage-1];\n-\t\tif (stage == 3 && emu23) { \n-\t\t\tfn = merge_function[3];\n-\t\t}\n \t}\n \tunpack_trees(fn);\n \tif (write_cache(newfd, active_cache, active_nr) ||\ndiff --git a/t/t1005-read-tree-m-2way-emu23.sh b/t/t1005-read-tree-m-2way-emu23.sh\ndeleted file mode 100755\n--- a/t/t1005-read-tree-m-2way-emu23.sh\n+++ /dev/null\n@@ -1,422 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2005 Junio C Hamano\n-#\n-\n-test_description='Two way merge with read-tree --emu23 $H $M\n-\n-This test tries two-way merge (aka fast forward with carry forward).\n-\n-There is the head (called H) and another commit (called M), which is\n-simply ahead of H.  The index and the work tree contains a state that\n-is derived from H, but may also have local changes.  This test checks\n-all the combinations described in the two-tree merge \"carry forward\"\n-rules, found in <Documentation/git-rev-tree.txt>.\n-\n-In the test, these paths are used:\n-        bozbar  - in H, stays in M, modified from bozbar to gnusto\n-        frotz   - not in H added in M\n-        nitfol  - in H, stays in M unmodified\n-        rezrov  - in H, deleted in M\n-        yomin   - not in H nor M\n-'\n-. ./test-lib.sh\n-\n-read_tree_twoway () {\n-    git-read-tree --emu23 \"$1\" \"$2\" &&\n-    git-ls-files --stage &&\n-    git-merge-cache git-merge-one-file-script -a &&\n-    git-ls-files --stage\n-}\n-\n-_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n-_x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\n-compare_change () {\n-\tsed -n >current \\\n-\t    -e '/^--- /d; /^+++ /d; /^@@ /d;' \\\n-\t    -e 's/^\\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\\) '\"$_x40\"' /\\1 X /p' \\\n-\t    \"$1\"\n-\tdiff -u expected current\n-}\n-\n-check_cache_at () {\n-\tclean_if_empty=`git-diff-files \"$1\"`\n-\tcase \"$clean_if_empty\" in\n-\t'')  echo \"$1: clean\" ;;\n-\t?*)  echo \"$1: dirty\" ;;\n-\tesac\n-\tcase \"$2,$clean_if_empty\" in\n-\tclean,)\t\t:     ;;\n-\tclean,?*)\tfalse ;;\n-\tdirty,)\t\tfalse ;;\n-\tdirty,?*)\t:     ;;\n-\tesac\n-}\n-\n-check_stages () {\n-    cat >expected_stages\n-    git-ls-files --stage | sed -e \"s/ $_x40 / X /\" >current_stages\n-    diff -u expected_stages current_stages\n-}\n-\n-cat >bozbar-old <<\\EOF\n-This is a sample file used in two-way fast forward merge\n-tests.  Its second line ends with a magic word bozbar\n-which will be modified by the merged head to gnusto.\n-It has some extra lines so that external tools can\n-successfully merge independent changes made to later\n-lines (such as this one), avoiding line conflicts.\n-EOF\n-\n-sed -e 's/bozbar/gnusto (earlier bozbar)/' bozbar-old >bozbar-new\n-\n-test_expect_success \\\n-    setup \\\n-    'echo frotz >frotz &&\n-     echo nitfol >nitfol &&\n-     cat bozbar-old >bozbar &&\n-     echo rezrov >rezrov &&\n-     echo yomin >yomin &&\n-     git-update-cache --add nitfol bozbar rezrov &&\n-     treeH=`git-write-tree` &&\n-     echo treeH $treeH &&\n-     git-ls-tree $treeH &&\n-\n-     cat bozbar-new >bozbar &&\n-     git-update-cache --add frotz bozbar --force-remove rezrov &&\n-     git-ls-files --stage >M.out &&\n-     treeM=`git-write-tree` &&\n-     echo treeM $treeM &&\n-     git-ls-tree $treeM &&\n-     git-diff-tree $treeH $treeM'\n-\n-# \"read-tree -m H I+H M\" but I is empty so this is \"read-tree -m H H M\".\n-#\n-# bozbar [O && A && B && O==A && O!=B (#14) ==> B] take M by read-tree\n-# frotz  [!O && !A && B (#2) ==> B]                take M by read-tree\n-# nitfol [O && A && B && O==A && O==B (#15) ==> B] take M by read-tree\n-# rezrov [O && A && !B && O==A (#10) ==> no merge] removed by script\n-#\n-# Earlier one did not have #2ALT so taking M was done by the script,\n-# which also updated the work tree and making frotz clean.  With #2ALT,\n-# this is resolved by read-tree itself and the path is left dirty\n-# because we are not testing \"read-tree -u --emu23\".\n-test_expect_success \\\n-    '1, 2, 3 - no carry forward' \\\n-    'rm -f .git/index &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >1-3.out &&\n-     diff -u M.out 1-3.out &&\n-     check_cache_at bozbar dirty &&\n-     check_cache_at frotz dirty && # same as pure 2-way again.\n-     check_cache_at nitfol dirty'\n-\n-echo '+100644 X 0\tyomin' >expected\n-\n-test_expect_success \\\n-    '4 - carry forward local addition.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     git-update-cache --add yomin &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >4.out || return 1\n-     diff -u M.out 4.out >4diff.out\n-     compare_change 4diff.out expected &&\n-     check_cache_at yomin clean'\n-\n-# \"read-tree -m H I+H M\" where !H && !M; so (I+H) not being up-to-date\n-# should not matter.  Thanks to #3ALT, this is now possible.\n-test_expect_success \\\n-    '5 - carry forward local addition.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo yomin >yomin &&\n-     git-update-cache --add yomin &&\n-     echo yomin yomin >yomin &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >5.out || return 1\n-     diff -u M.out 5.out >5diff.out\n-     compare_change 5diff.out expected &&\n-     check_cache_at yomin dirty'\n-\n-# \"read-tree -m H I+H M\" where !H && M && (I+H) == M, so this should\n-# succeed (even the entry is clean), now thanks to #5ALT.\n-test_expect_success \\\n-    '6 - local addition already has the same.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     git-update-cache --add frotz &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >6.out &&\n-     diff -u M.out 6.out &&\n-     check_cache_at frotz clean'\n-\n-# Exactly the same pattern as above but with dirty cache.  This also\n-# should succeed, now thanks to #5ALT.\n-test_expect_success \\\n-    '7 - local addition already has the same.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo frotz >frotz &&\n-     git-update-cache --add frotz &&\n-     echo frotz frotz >frotz &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >7.out &&\n-     diff -u M.out 7.out &&\n-     check_cache_at frotz dirty'\n-\n-test_expect_success \\\n-    '8 - conflicting addition.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo frotz frotz >frotz &&\n-     git-update-cache --add frotz &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-test_expect_success \\\n-    '9 - conflicting addition.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo frotz frotz >frotz &&\n-     git-update-cache --add frotz &&\n-     echo frotz >frotz &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-test_expect_success \\\n-    '10 - path removed.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo rezrov >rezrov &&\n-     git-update-cache --add rezrov &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >10.out &&\n-     diff -u M.out 10.out'\n-\n-test_expect_success \\\n-    '11 - dirty path removed.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo rezrov >rezrov &&\n-     git-update-cache --add rezrov &&\n-     echo rezrov rezrov >rezrov &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-test_expect_success \\\n-    '12 - unmatching local changes being removed.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo rezrov rezrov >rezrov &&\n-     git-update-cache --add rezrov &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-test_expect_success \\\n-    '13 - unmatching local changes being removed.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo rezrov rezrov >rezrov &&\n-     git-update-cache --add rezrov &&\n-     echo rezrov >rezrov &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-cat >expected <<EOF\n--100644 X 0\tnitfol\n-+100644 X 0\tnitfol\n-EOF\n-\n-test_expect_success \\\n-    '14 - unchanged in two heads.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo nitfol nitfol >nitfol &&\n-     git-update-cache --add nitfol &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >14.out || return 1\n-     diff -u M.out 14.out >14diff.out\n-     compare_change 14diff.out expected &&\n-     check_cache_at nitfol clean'\n-\n-test_expect_success \\\n-    '15 - unchanged in two heads.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo nitfol nitfol >nitfol &&\n-     git-update-cache --add nitfol &&\n-     echo nitfol nitfol nitfol >nitfol &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >15.out || return 1\n-     diff -u M.out 15.out >15diff.out\n-     compare_change 15diff.out expected &&\n-     check_cache_at nitfol dirty'\n-\n-# This is different from straight 2-way merge in that it leaves\n-# three stages of bozbar in the index file without failing, so\n-# the user can run git-diff-stages to examine the situation.\n-# With #2ALT, frotz is resolved internally.\n-test_expect_success \\\n-    '16 - conflicting local change.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo bozbar bozbar >bozbar &&\n-     git-update-cache --add bozbar &&\n-     git-read-tree --emu23 $treeH $treeM &&\n-     check_stages' <<\\EOF\n-100644 X 1\tbozbar\n-100644 X 2\tbozbar\n-100644 X 3\tbozbar\n-100644 X 0\tfrotz\n-100644 X 0\tnitfol\n-100644 X 1\trezrov\n-100644 X 2\trezrov\n-EOF\n-\n-test_expect_success \\\n-    '17 - conflicting local change.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     echo bozbar bozbar >bozbar &&\n-     git-update-cache --add bozbar &&\n-     echo bozbar bozbar bozbar >bozbar &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-test_expect_success \\\n-    '18 - local change already having a good result.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     cat bozbar-new >bozbar &&\n-     git-update-cache --add bozbar &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >18.out &&\n-     diff -u M.out 18.out &&\n-     check_cache_at bozbar clean'\n-\n-test_expect_success \\\n-    '19 - local change already having a good result, further modified.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     cat bozbar-new >bozbar &&\n-     git-update-cache --add bozbar &&\n-     echo gnusto gnusto >bozbar &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >19.out &&\n-     diff -u M.out 19.out &&\n-     check_cache_at bozbar dirty'\n-\n-test_expect_success \\\n-    '20 - no local change, use new tree.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     cat bozbar-old >bozbar &&\n-     git-update-cache --add bozbar &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >20.out &&\n-     diff -u M.out 20.out &&\n-     check_cache_at bozbar dirty'\n-\n-test_expect_success \\\n-    '21 - no local change, dirty cache.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     cat bozbar-old >bozbar &&\n-     git-update-cache --add bozbar &&\n-     echo gnusto gnusto >bozbar &&\n-     if read_tree_twoway $treeH $treeM; then false; else :; fi'\n-\n-echo '-100644 X 0\tbozbar\n-+100644 X 0\tbozbar' >expected\n-\n-# This fails with straight two-way fast forward, but emu23\n-# can merge them.\n-test_expect_success \\\n-    '22 - local change cache updated.' \\\n-    'rm -f .git/index &&\n-     git-read-tree $treeH &&\n-     git-checkout-cache -u -f -q -a &&\n-     sed -e \"s/such as/SUCH AS/\" bozbar-old >bozbar &&\n-     git-update-cache --add bozbar &&\n-     read_tree_twoway $treeH $treeM &&\n-     git-ls-files --stage >22.out || return 1\n-     diff -u M.out 22.out >22diff.out\n-     compare_change 22diff.out &&\n-     check_cache_at bozbar clean'\n-\n-# Also make sure we did not break DF vs DF/DF case.\n-test_expect_success \\\n-    'DF vs DF/DF case setup.' \\\n-    'rm -f .git/index &&\n-     echo DF >DF &&\n-     git-update-cache --add DF &&\n-     treeDF=`git-write-tree` &&\n-     echo treeDF $treeDF &&\n-     git-ls-tree $treeDF &&\n-     git-ls-files --stage >DF.out\n-\n-     rm -f DF &&\n-     mkdir DF &&\n-     echo DF/DF >DF/DF &&\n-     git-update-cache --add --remove DF DF/DF &&\n-     treeDFDF=`git-write-tree` &&\n-     echo treeDFDF $treeDFDF &&\n-     git-ls-tree $treeDFDF &&\n-     git-ls-files --stage >DFDF.out'\n-\n-test_expect_success \\\n-    'DF vs DF/DF case test (#1)' \\\n-    'rm -f .git/index &&\n-     rm -fr DF &&\n-     echo DF >DF &&\n-     git-update-cache --add DF &&\n-     read_tree_twoway $treeDF $treeDFDF &&\n-     git-ls-files --stage >DFDFcheck.out &&\n-     diff -u DFDF.out DFDFcheck.out &&\n-     check_cache_at DF/DF clean && # different from pure 2-way\n-     :'\n-\n-# The other way around\n-test_expect_success \\\n-    'DF vs DF/DF case test (#2)' \\\n-    'rm -f .git/index &&\n-     rm -fr DF &&\n-     mkdir DF &&\n-     echo DF/DF >DF/DF &&\n-     git-update-cache --add DF/DF &&\n-     read_tree_twoway $treeDFDF $treeDF &&\n-     git-ls-files --stage >DFDFcheck.out &&\n-     diff -u DF.out DFDFcheck.out &&\n-     check_cache_at DF clean && # different from pure 2-way\n-     :'\n-\n-# Emu23 can grok I having more than H.  Make sure we did not\n-# botch the conflict tests (fixed).\n-test_expect_success \\\n-    'DF vs DF/DF case test (#3).' \\\n-    'rm -f .git/index &&\n-     rm -fr DF &&\n-     mkdir DF &&\n-     echo DF/DF >DF/DF &&\n-     git-update-cache --add DF/DF &&\n-     # This should fail because I and H have a conflict\n-     # at DF.\n-     if git-read-tree --emu23 $treeDF $treeDFDF\n-     then false\n-     else true\n-     fi'\n-\n-test_done\n"},{"id":"8002","messageId":"7vll2gkmcc.fsf@assigned-by-dhcp.cox.net","threadId":"1712","inReplyTo":"Pine.LNX.4.63.0509020202030.23242@iabervon.org","subject":"Re: [PATCH 3/2] Remove emu23, fix entry order","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-02T06:36:19Z","receivedAt":"2005-09-02T06:36:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> A few things to improve testing. I'll clean up the series as a whole once \n> it's tested.\n>\n> This removes the emu23 tests; I think that the only DF conflict tests were \n> in that set, however, so these should be fished out and added to something \n> else.\n\nThanks.  I'll take a look at 'test moving' part later, perhaps\nthis weekend.\n\nI should give Pasky a heads-up, since I vaguely recall him\nwriting something about always doing 3-way merge even when fast\nforwarding in his TODO list in the Cogito tree, and just in case\nemu23 was what he had in mind...  I'll also CC: Catalin too\njust in case StGIT is tempted to use emu23 in git.switch().\n\nPetr, we _might_ remove \"read-tree --emu23\" in the near future,\nbut not immediately.  That will not happen until the read-tree\nrewrite Daniel is working on proves to be useful in making\n'interesting' merges more reliably work.\n"}]}