From: Heiko Voigt <hvoigt@hvoigt.net>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Daniel Bratell <bratell@opera.com>, git@vger.kernel.org
Subject: Re: Merging submodules - best merge-base
Date: Sun, 10 Mar 2013 18:09:53 +0100 [thread overview]
Message-ID: <20130310170953.GA1248@sandbox-ub.fritz.box> (raw)
In-Reply-To: <513B7554.4020700@web.de>
On Sat, Mar 09, 2013 at 06:45:56PM +0100, Jens Lehmann wrote:
> Am 07.03.2013 19:59, schrieb Heiko Voigt:
> > On Thu, Mar 07, 2013 at 10:49:09AM +0100, Daniel Bratell wrote:
> >> Den 2013-03-06 19:12:05 skrev Heiko Voigt <hvoigt@hvoigt.net>:
> >>> So to summarize what you are requesting: You want a submodule merge be
> >>> two way in the view of the superproject and calculate the merge base
> >>> in the submodule from the two commits that are going to be merged?
> >>>
> >>> It currently sounds logical but I have to think about it further and
> >>> whether that might break other use cases.
> >>
> >> Maybe both could be legal even. The current code can't be all wrong,
> >> and this case also seems to be straightforward.
> >
> > Ok I have thought about it further and I did not come up with a simple
> > (and stable) enough strategy that would allow your use case to merge
> > cleanly without user interaction.
> >
> > The problem is that your are actually doing a rewind from base to both
> > tips. The fact that a rewind is there makes git suspicious and we simply
> > give up. IMO, thats the right thing to do in such a situation.
> >
> > What should a merge strategy do? It infers from two changes what the
> > final intention might be. For submodules we can do that when the changes
> > on both sides point forward. Since thats the typical progress of
> > development. If not there is some reason for it we do not know about. So
> > the merge gives up.
> >
> > Please see this post about why we need to forbid rewinds from the
> > initial design discussion:
> >
> > http://article.gmane.org/gmane.comp.version-control.git/149003
>
> I agree that rewinds are a very good reason not merge two branches using
> a fast-forward strategy, but I believe Daniel's use case is a (and maybe
> the only) valid exception to that rule: both branches contain *exactly*
> the same rewind. In that case I don't see any problem to just do a fast
> forward to S21, as both agree on the commits to rewind.
That is different than using the merge base of the two commits needing
merge. I agree that rewinding to exactly the same commits is probably a
valid exception. Will have a look into extending the submodule merge
strategy to include this case.
Cheers Heiko
next prev parent reply other threads:[~2013-03-10 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 16:44 Merging submodules - best merge-base Daniel Bratell
2013-03-06 18:12 ` Heiko Voigt
2013-03-07 9:49 ` Daniel Bratell
2013-03-07 18:59 ` Heiko Voigt
2013-03-09 17:45 ` Jens Lehmann
2013-03-10 17:09 ` Heiko Voigt [this message]
2013-03-11 20:30 ` [RFC/PATCH] submodule: allow common rewind when merging submodules Heiko Voigt
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=20130310170953.GA1248@sandbox-ub.fritz.box \
--to=hvoigt@hvoigt.net \
--cc=Jens.Lehmann@web.de \
--cc=bratell@opera.com \
--cc=git@vger.kernel.org \
/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).