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

Re: [RFC/PATCH] Fast forward strategies only, common, fork and path

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 5, 2008, 09:34 UTC
Message-ID
<m38x1z692o.fsf@localhost.localdomain>
In-Reply-To
<402c10cd0802042332i4e49cdaxf1fa1a7fc09c15b9@mail.gmail.com>
"Sverre Hvammen Johansen" <hvammen@gmail.com> writes:
Show 28 quoted lines
> On Feb 4, 2008 12:22 AM, Junio C Hamano <gitster@pobox.com> wrote:
> >
> > The documentation updates talked about what the options do, but
> > it was unclear why they could be useful in what situations and
> > workflows.  At least it was not apparent to me on my cursory
> > read.
> 
> Common, fork, and path only make sense where there are at least three
> repositories or two plus an observer involved.
> 
> Lets explain the observer cases.
> 
> The observer is interested in changes that X, Y and Z agree upon.  He
> can merge as follows:
> 
>   git merge --ff=common X Y Z
> 
> The observer is interested in changes up to the point where someone is
> known to disagree.  He can merge as follows:
> 
>    git merge --ff=fork X Y Z
> 
>  The observer is interested in any give path up to one of the true
> parents.  He can merge as follows:
> 
>   git merge --ff=path X Y Z
> 
> This will give priority to X then Y.

Could you please provide ascii-art diagrams for above explanations (above cases), such as the following diagrams for fast-forward, and for forced merge (no fast-forward)? This would make your explanations much easier to follow, I think.

1. Fast-forward ("traditional", 2 heads)
   before merge
   a---b---c---d               <-- main
                \
                 \-E---F---G  <-- side
   after merge
   a---b---c---d---E---F---G  <-- main
                           ^
                            \----- side
2. Forced merge commits ("never", 2 heads)
   before merge
   a---b---c---d               <-- main
                \
                 \-E---F---G  <-- side
   after merge
   a---b---c---d-------------*  <-- main
                \           /
                 \-E---F---G    <-- side
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Sverre Hvammen JohansenNext: Junio C Hamano
Message 8 of 14 in “Fast forward strategies only, common, fork and path”
  1. Fast forward strategies only, common, fork and pathSverre Hvammen Johansen, Feb 4, 2008
  2. Stefan (metze) MetzmacherFeb 4, 2008
  3. Sverre Hvammen JohansenFeb 4, 2008
  4. Junio C HamanoFeb 4, 2008
  5. Sverre Hvammen JohansenFeb 4, 2008
  6. Junio C HamanoFeb 4, 2008
  7. Sverre Hvammen JohansenFeb 5, 2008
  8. Jakub NarebskiFeb 5, 2008
  9. Junio C HamanoFeb 5, 2008
  10. Sverre Hvammen JohansenFeb 6, 2008
  11. Sverre Hvammen JohansenFeb 4, 2008
  12. Junio C HamanoFeb 4, 2008
  13. Sverre Hvammen JohansenFeb 4, 2008
  14. Sverre Hvammen JohansenFeb 4, 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.