git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH Second draft] Fast forward strategies allow, never, and only

From
Sverre Hvammen Johansen <hvammen@gmail.com>
Date
Mar 20, 2008, 04:44 UTC
Message-ID
<402c10cd0803192144n716cf66dgd4d660f4917a80fc@mail.gmail.com>
In-Reply-To
<200803192220.59035.jnareb@gmail.com>
On Wed, Mar 19, 2008 at 1:20 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 15 quoted lines
>  > +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 current `HEAD` of master:
>  > +
>  > +------------
>  > +                    o---o---o  TopicB
>  > +                   /
>  > +          o---o---o  TopicA
>  > +         /
>  > +    o---o---o---o---o---o  master
>  > +                         \
>  > +                          o---o  TopicC
>  > +------------
>
>  I'd provide first simpler example without 'TopicC'.

If we are to explain how this is recorded this is how simple we can make it without leaving anything out. However, I am not sure we should have this in the documentation at all. Most users probably don't care exactly how this is recorded as long as the history down the road is not to complicated.

>  If I understand correctly you have implemented here always using
>  "parent" (or "dependent") reduction of merge heads. IMHO this reduction
>  contradict stated idea of using --ff=never (--no-ff) to always mark
>  where topic branch has ended.

When using --ff=never this reduction will not be done and that is also how current git works (except that you need to say --no-ff).

Show 14 quoted lines
>  > +         % git co master
>  > +         % git merge TopicA TopicB TopicC
>  > +
>  > +                    o---o---o  TopicB
>  > +                   /         \
>  > +          o---o---o  TopicA   \
>  > +         /                     \
>  > +    o---o---o---o---o---o.......o  master
>  > +                         \     /
>  > +                          o---o  TopicC
>  > +------------
>
>  This... is a bit unexpected. I thought that there should be line where
>  I have added dotted line.
The graph also describes how current git record this.  Try the example
and see for yourself.  The main difference between the patch and
current git is that the patch is trying to be smarter about how it
selects the merge algorithm, and which commits are passed on to the
real merge algorithm.  In the example above it makes no difference
since octopus is used and whether octopus is getting three or four
branches does not matter at all since the octopus merge is able to do
this reduction internally.  But in the case where we end up with two
branches it makes a huge difference since we then can use the more
smarter merge algorithms, and more cases will be merged automatically.
 However, all this does not make much of a difference in most cases.
Git rocks whether we decide to do this or not.
>  I'd really prefer if you would resurrect merge head reduction options
>  (strategies?) as it was, i.e. as separate patch. And of course talk
>  about reducing heads, not fast-forward options/strategies... this issue
>  is IMVHO orthogonal to options for allowing/forcing/denying fast-forward.

The first patch had the same features, was implemented slightly differently, but lacked a lot of documentation.

-- 
Sverre Hvammen Johansen
Previous: Jakub NarebskiNext: Junio C Hamano
Message 19 of 27 in “Fast forward strategies allow, never, and only”
  1. Fast forward strategies allow, never, and onlySverre Hvammen Johansen, Mar 11, 2008
  2. Sverre Hvammen JohansenMar 11, 2008
  3. Ping YinMar 11, 2008
  4. Junio C HamanoMar 11, 2008
  5. Sverre Hvammen JohansenMar 12, 2008
  6. Sverre Hvammen JohansenMar 16, 2008
  7. Sverre Hvammen JohansenMar 14, 2008
  8. Jakub NarebskiMar 11, 2008
  9. Sverre Hvammen JohansenMar 12, 2008
  10. Junio C HamanoMar 12, 2008
  11. Sverre Hvammen JohansenMar 12, 2008
  12. Sverre Hvammen JohansenMar 18, 2008
  13. Ping YinMar 18, 2008
  14. Sverre Hvammen JohansenMar 18, 2008
  15. Jon LoeligerMar 18, 2008
  16. Jakub NarebskiMar 18, 2008
  17. Sverre Hvammen JohansenMar 19, 2008
  18. Jakub NarebskiMar 19, 2008
  19. Sverre Hvammen JohansenMar 20, 2008
  20. Junio C HamanoMar 19, 2008
  21. Sverre Hvammen JohansenMar 20, 2008
  22. Junio C HamanoMar 22, 2008
  23. Sverre Hvammen JohansenMar 26, 2008
  24. Sverre Hvammen JohansenMar 31, 2008
  25. Fast forward strategies allow, never, and onlySverre Hvammen Johansen, Apr 20, 2008
  26. Junio C HamanoApr 22, 2008
  27. Sverre Hvammen JohansenApr 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.