Re: [RFC/PATCH] Additional fast forward strategies.
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Mar 11, 2008, 09:09 UTC
- Message-ID
- <m37ig9zky7.fsf@localhost.localdomain>
- In-Reply-To
- <402c10cd0803102004x7892f01cledfef6f277fba26a@mail.gmail.com>
"Sverre Hvammen Johansen" <hvammen@gmail.com> writes:
Show 6 quoted lines
> From: Sverre Hvammen Johansen <hvammen@gmail.com> > 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.
Show 10 quoted lines
> 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@black.local>
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 <--- aIf 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 <--- aIf 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
^------- aor
A---B---1---2 <--- master <--- HEAD
^
\------ a%%
A---B <--- master <--- HEAD
\
\-1---2 <--- a
^------- bThis I think is 'FF strategy "same"' situation.
%%
A---B <--- master <--- HEAD
\
\-1---2 <--- a
\
\-3 <--- bThis I guess is either 'common' or 'fork' situation.
-- Jakub Narebski Poland ShadeHawk on #git