{"thread":{"id":"34574","subject":"Unexpected merge results in git-svn repo","startedAt":"2013-07-31T10:14:57Z","lastAt":"2013-07-31T11:51:34Z","messageCount":2,"participants":["Jon Seymour"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"224346","messageId":"CAH3AnrqmFJxuy7PyJZS83VEwzrQB+mA5Frttd5fzKBhpZGP4Eg@mail.gmail.com","threadId":"34574","inReplyTo":null,"subject":"Unexpected merge results in git-svn repo","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2013-07-31T10:14:57Z","receivedAt":"2013-07-31T10:14:57Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"I am getting some unexpected results from a merge and I'd like to\nunderstand why.\n\nI have two commits X and Y that I want to merge.\n\ngit merge-base X Y # yields B\ngit diff B X -- F  # is empty\ngit diff B Y -- F  # contains the change I want merged\ngit rev-list X ^B -- F # is empty\ngit rev-list Y ^B -- F # contains one commit\n\ngit checkout X\ngit merge Y\n\nfails with fixable merge conflicts on other files, but uses X's copy\nof F instead of Y's.\n\nI was expecting it to use Y's copy of F, since only Y has modified F since B.\n\nWhat could cause this?\n\nBTW: I am using a git-svn repo that does have some 4+ parent merges in it.\n\njon.\n"},{"id":"224349","messageId":"CAH3AnrqAXhNEnKFxta5TGHwus+Sck1moEZe5V1J_9k7ZHQuW=A@mail.gmail.com","threadId":"34574","inReplyTo":"CAH3AnrqmFJxuy7PyJZS83VEwzrQB+mA5Frttd5fzKBhpZGP4Eg@mail.gmail.com","subject":"Re: Unexpected merge results in git-svn repo","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2013-07-31T11:51:34Z","receivedAt":"2013-07-31T11:51:34Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"To answer my own question...\n\nMy issue turned to be caused by a bad graft in my repo (unfortunately,\nsince hardened with filter-branch) that was making the commit that\nmodified F on Y reachable from X. The graft was an (incorrectly\nexecuted) attempt to deal with the \"3+ parent\" problem that sometimes\noccurs when git-svn pulls merges back from SVN.\n\njon.\n\nOn Wed, Jul 31, 2013 at 8:14 PM, Jon Seymour <jon.seymour@gmail.com> wrote:\n> I am getting some unexpected results from a merge and I'd like to\n> understand why.\n>\n> I have two commits X and Y that I want to merge.\n>\n> git merge-base X Y # yields B\n> git diff B X -- F  # is empty\n> git diff B Y -- F  # contains the change I want merged\n> git rev-list X ^B -- F # is empty\n> git rev-list Y ^B -- F # contains one commit\n>\n> git checkout X\n> git merge Y\n>\n> fails with fixable merge conflicts on other files, but uses X's copy\n> of F instead of Y's.\n>\n> I was expecting it to use Y's copy of F, since only Y has modified F since B.\n>\n> What could cause this?\n>\n> BTW: I am using a git-svn repo that does have some 4+ parent merges in it.\n>\n> jon.\n"}]}