git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Unexpected merge results in git-svn repo
@ 2013-07-31 10:14 Jon Seymour
  2013-07-31 11:51 ` Jon Seymour
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Seymour @ 2013-07-31 10:14 UTC (permalink / raw)
  To: Git Mailing List

I am getting some unexpected results from a merge and I'd like to
understand why.

I have two commits X and Y that I want to merge.

git merge-base X Y # yields B
git diff B X -- F  # is empty
git diff B Y -- F  # contains the change I want merged
git rev-list X ^B -- F # is empty
git rev-list Y ^B -- F # contains one commit

git checkout X
git merge Y

fails with fixable merge conflicts on other files, but uses X's copy
of F instead of Y's.

I was expecting it to use Y's copy of F, since only Y has modified F since B.

What could cause this?

BTW: I am using a git-svn repo that does have some 4+ parent merges in it.

jon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unexpected merge results in git-svn repo
  2013-07-31 10:14 Unexpected merge results in git-svn repo Jon Seymour
@ 2013-07-31 11:51 ` Jon Seymour
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Seymour @ 2013-07-31 11:51 UTC (permalink / raw)
  To: Git Mailing List

To answer my own question...

My issue turned to be caused by a bad graft in my repo (unfortunately,
since hardened with filter-branch) that was making the commit that
modified F on Y reachable from X. The graft was an (incorrectly
executed) attempt to deal with the "3+ parent" problem that sometimes
occurs when git-svn pulls merges back from SVN.

jon.

On Wed, Jul 31, 2013 at 8:14 PM, Jon Seymour <jon.seymour@gmail.com> wrote:
> I am getting some unexpected results from a merge and I'd like to
> understand why.
>
> I have two commits X and Y that I want to merge.
>
> git merge-base X Y # yields B
> git diff B X -- F  # is empty
> git diff B Y -- F  # contains the change I want merged
> git rev-list X ^B -- F # is empty
> git rev-list Y ^B -- F # contains one commit
>
> git checkout X
> git merge Y
>
> fails with fixable merge conflicts on other files, but uses X's copy
> of F instead of Y's.
>
> I was expecting it to use Y's copy of F, since only Y has modified F since B.
>
> What could cause this?
>
> BTW: I am using a git-svn repo that does have some 4+ parent merges in it.
>
> jon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-31 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 10:14 Unexpected merge results in git-svn repo Jon Seymour
2013-07-31 11:51 ` Jon Seymour

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).