{"thread":{"id":"9168","subject":"[RFH] 3way still has D/F conflict problems...","startedAt":"2007-07-23T07:22:51Z","lastAt":"2007-07-23T07:22:51Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48274","messageId":"7vejizmvn8.fsf@assigned-by-dhcp.cox.net","threadId":"9168","inReplyTo":null,"subject":"[RFH] 3way still has D/F conflict problems...","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-23T07:22:51Z","receivedAt":"2007-07-23T07:22:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The four commit series starting at 4c4caaf fixed a few D/F\nconflict case in merge recursive.\n\n  4c4caaf... Treat D/F conflict entry more carefully in unpack-tree...\n  ac7f0f4... merge-recursive: do not barf on \"to be removed\" entries.\n  4d50895... merge-recursive: handle D/F conflict case more carefully.\n  885b981... t3030: merge-recursive backend test.\n\nHowever this ended up regressed the following case (don't bother\nbisecting, it will point at 4c4caaf).\n\nThe test case starts with a tree with a directory at D/,\none branch (master) modifies files in it, while the other branch\n(side) makes a bunch of rename and has a blob at D.A, D, and D0C\n\nYes, this does not trigger if you change D.A to DxA (anything\nthat does not sort before D/ in the index).\n\nAnybody interested in figuring out how to fix unpack-trees.c\nwithout breaking the problem the above series fixed?\n\n---\n\n t/t3031-df-3way.sh |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 58 insertions(+), 0 deletions(-)\n create mode 100755 t/t3031-df-3way.sh\n\ndiff --git a/t/t3031-df-3way.sh b/t/t3031-df-3way.sh\nnew file mode 100755\nindex 0000000..42548d2\n--- /dev/null\n+++ b/t/t3031-df-3way.sh\n@@ -0,0 +1,58 @@\n+#!/bin/sh\n+\n+test_description='D/F conflicting threeway merge'\n+\n+. ./test-lib.sh\n+\n+fill () {\n+\tcnt=\"$1\"\n+\tshift\n+\twhile test \"$cnt\" -ge 0\n+\tdo\n+\t\tcnt=$(( $cnt - 1 ))\n+\t\tfor line\n+\t\tdo\n+\t\t\techo \"$line\"\n+\t\tdone\n+\tdone\n+}\n+\n+T=D\n+\n+test_expect_success 'setup' '\n+\n+\tmkdir D &&\n+\tfill 50 \"Tis true without lying, certain & most true.\" >D/A &&\n+\tfill 50 \"The Sun is its father, the moon its mother,\" >D/B &&\n+\tfill 50 \"the wind hath carried it in its belly, the earth its nourse.\" >D/C &&\n+\tgit add D/A D/B D/C &&\n+\ttest_tick &&\n+\tgit commit -m \"Initial\" &&\n+\n+\tgit tag initial &&\n+\tgit branch side &&\n+\n+\techo \"It has the Sun for father and the Moon for mother:\" >>D/B &&\n+\ttest_tick &&\n+\tgit commit -a -m \"master changes in-place\" &&\n+\n+\tgit checkout side &&\n+\techo \"Truth! Certainty! That in which there is no doubt!\" >D.A &&\n+\tcat D/A >>D.A &&\n+\techo \"Its father is the Sun and its mother the Moon.\" >B &&\n+\tcat D/B >>B &&\n+\tmv D/C D0C &&\n+\trm -rf D &&\n+\tmv B $T &&\n+\tgit add D.A $T D0C &&\n+\ttest_tick &&\n+\tgit commit -a -m \"side moves and makes changes\"\n+'\n+\n+test_expect_success 'threeway' '\n+\n+\tgit read-tree -m initial side master\n+\n+'\n+\n+test_done\n"}]}