git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Lynn Lin <lynn.xin.lin@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: git merge successfully however this is still issue from logical perspective
Date: Wed, 26 Oct 2011 14:39:10 +0200	[thread overview]
Message-ID: <201110261439.10751.trast@student.ethz.ch> (raw)
In-Reply-To: <CAPgpnMR6_pRxMSLcdS=M4Cfj=dqk6KTXr3VGhk3LrnPHyv2waA@mail.gmail.com>

Lynn Lin wrote:
> On Wed, Oct 26, 2011 at 8:27 PM, Thomas Rast <trast@student.ethz.ch> wrote:
> > Lynn Lin wrote:
> >> Hi all,
> >>    Do this case can happen? When I do merge from one branch to master
> >> branch,merge successfully however from code logical perspective it
> >> fails and It cause code compile (our project is using C++ language)
> >
> > Sure.  The easiest example is when one side of a merge renames foo()
> > to bar(), while the other side introduces another call to foo() in an
> > unrelated part of the code.
> Does this mean we shouldn't trust merge result  ?

Depends what you mean by "trust".

If you expected a merge to understand what the changes on each side
were about, and then patch the code accordingly, no it can't do
that.[*] You are in no way guaranteed that the result of a merge is
correct or even compiles even if both sides of the merge were.

But after all git-merge is just a tool doing a well-defined operation:
textually merging the changes from both sides.  AFAIK it could so far
always be trusted with doing *that* correctly.



[*] darcs can go half of the way by having more expressive
"changesets", but this can also fail.  I think the general problem is
AI-complete.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

      reply	other threads:[~2011-10-26 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 12:08 git merge successfully however this is still issue from logical perspective Lynn Lin
2011-10-26 12:27 ` Thomas Rast
2011-10-26 12:29   ` Lynn Lin
2011-10-26 12:39     ` Thomas Rast [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201110261439.10751.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=lynn.xin.lin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).