Re: [RFC/PATCH] Additional fast forward strategies.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Sverre Hvammen Johansen" <hvammen@xxxxxxxxx> writes:

> From: Sverre Hvammen Johansen <hvammen@xxxxxxxxx>
> Subject: [PATCH] Additional fast forward strategies.
> 
> New fast forward strategies, common, fork, path, and same
> is introduced.  These new fast forward strategies allows
> additional work flows.

It would be better (read: greater chance to be accepted) if you had
provided examples of those "additional workflows", best in EXAMPLES
section (or something like that) of fast-forward documentation, and
"see documentation" (or something like that) in commit message.
 
> FF strategy "common" does a fast-forward to the common ancestor
> of the specified heads.  The merge will fail unless HEAD is the
> common ancestor or HEAD can be fast-forwarded to the common ancestor.

Don't you mean "common descendant" here?

> FF strategy "fork" does a fast-forward to the common ancestor
> of the real heads.  The merge will fail unless HEAD is the
> common ancestor of these heads or HEAD can be fast-forwarded
> to the common ancestor of the real heads.

What is the difference between 'real heads' and 'soecified heads'?
Example, please.

> FF strategy "path" does a fast-forward to the first possible
> branch that no other branches are ahead of.  HEAD will be
> fast-forwarded to such a branch if it exist.  If no such branch
> exist, HEAD is considered to be up to date.
> 
> FF strategy "same" does a fast forward where all branches are
> required to point to the same commit.  HEAD will be
> fast-forwarded to this branch unless it is up to date.
> 
> Signed-off-by: Sverre Hvammen Johansen <sj@xxxxxxxxxxx>

It will be easier to understand those descriptions if you have
provided with ASCII-art diagrams (in the documentation, not
necessarily in fast-forward strategies^W options description, but
perhaps somewhere below, above FAST-FORWARD OPTIONS EXAMPLES section).

For example, by default you can fast-forward only when doing single
branch merge.

%%

  A---B---C---D   <--- master <--- HEAD
       \
        \-1---2   <--- a

If you have situation as above, you are on branch 'master',
and you do "git merge a" it would result in merge commit.

  A---B---C---D---M   <--- master <--- HEAD
       \         /
        \-1---2-/     <--- a

%%

  A---B           <--- master <--- HEAD
       \
        \-1---2   <--- a

If you have situation as above, you are on branch 'master',
and you do "git merge a" it would result in fast-forward.

  A---B---1---2   <--- master <--- HEAD
                    
              ^------- a

or

  A---B---1---2   <--- master <--- HEAD
              ^      
               \------ a


%%

  A---B           <--- master <--- HEAD
       \
        \-1---2   <--- a
              
              ^------- b

This I think is 'FF strategy "same"' situation.

%%

  A---B              <--- master <--- HEAD
       \
        \-1---2      <--- a
               \
                \-3  <--- b

This I guess is either 'common' or 'fork' situation.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux