From: "Sverre Hvammen Johansen" <hvammen@gmail.com>
To: "Jakub Narebski" <jnareb@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 4/5] Head reduction before selecting merge strategy
Date: Sat, 3 May 2008 21:52:32 -0700 [thread overview]
Message-ID: <402c10cd0805032152g1cb3f10cr69f1735785c5d647@mail.gmail.com> (raw)
In-Reply-To: <m3prsep6oy.fsf@localhost.localdomain>
On Fri, Apr 25, 2008 at 3:31 AM, Jakub Narebski <jnareb@gmail.com> wrote:
> "Sverre Hvammen Johansen" <hvammen@gmail.com> writes:
>
> > See the documentation for an explanation of this feature.
>
> I think I get the idea now.
>
> You want to generalize fast-forward merge, or what's equivalent make
> fast-formard merge to be special case of head reduction. This should
> be written both in commit message and in documentation. Do I
> understand your goal correctly?
>
> With head reduction comes three things:
> * the merge strategy used
> * recorded parents
> * generated merge commit message
The recorded parents and the generated merge commit message is the
same with or without this patch. The only difference is the merge
strategy used.
> The simplest way would be to use reduced head for all three things,
> I think.
Actually, we can't do that. A real merge always need to involve HEAD.
In the case that HEAD is not included in the reduced parents we could
do a FF+merge, but that is a rather radical change that deserve its
own patch.
Changing the generated merge commit message is also a radical change.
I don't intend to write any patches for this for now. Maybe later if
the series gets accepted.
> But I also think that this commit in series is the most controversial
> one; is it realy needed for other commits? I would put it then as the
> last commit in series...
I agree with you, but I don't intend to spend time on this now to
rewrite it again. I am quite happy with how the series turned out.
> > +The following shows master and three topic branches. topicB is based
> > +on topicA, topicA is previously branched off from master, and topicC
> > +is based on the tip of the master branch:
> > +
> > +------------
> > + o---o---o topicB
> > + /
> > + o---o---o topicA
> > + /
> > + o---o---o---o---o---o master
> > + \
> > + o---o topicC
> > +------------
>
> I think I would start with simpler example without 'topicC', of
> reduction of octopus to two-parent ordinary merge.
I am not sure that we need to have this in the documentation at all.
I have asked for comments on this before but not received any
feedback. This late, the documentation will have to be fixed in-tree,
if needed.
> > diff --git a/git-merge.sh b/git-merge.sh
> > index 7c34b6c..7c70c56 100755
> > --- a/git-merge.sh
> > +++ b/git-merge.sh
> > @@ -337,11 +337,16 @@ set x $remoteheads ; shift
> >
> > find_reduced_parents "$@"
> >
> > -actual_parents=$(git rev-parse "$@")
>
> This was introduced by some of your earlier commits, isn't it?
Yes, [PATCH 3/5] Restructure git-merge.sh
--
Sverre Hvammen Johansen
prev parent reply other threads:[~2008-05-04 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 5:52 [PATCH 4/5] Head reduction before selecting merge strategy Sverre Hvammen Johansen
2008-04-25 10:31 ` Jakub Narebski
2008-05-04 4:52 ` Sverre Hvammen Johansen [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=402c10cd0805032152g1cb3f10cr69f1735785c5d647@mail.gmail.com \
--to=hvammen@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@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).