From: colin@horizon.com
To: hvammen@gmail.com, git@vger.kernel.org
Subject: Re: [RFC/PATCH] Fast forward strategies allow, never, and only
Date: Tue, 11 Mar 2008 05:35:53 -0400 [thread overview]
Message-ID: <20080311093553.23191.qmail@science.horizon.com> (raw)
> What's lacking is "why this is a good idea".
Seconded. A long time ago (and I'm too lazy to find a link), Linus
explained why disabling fast-forward merges was almost always a Bad Idea,
and nobody has come up with a good reason why you'd want one since.
But from memory, suppose that you have two developers, each working on
their own branch:
a--a--a <-- A's head
/
o--o
\
b--b--b <-- B's head
Then suppose that they merge back and forth to get to the same state.
With fast-forward merges, it will go like this:
A merges from B:
a--a--a
/ \
o--o o <-- A's head
\ /
b--b--b <-- B's head
Then B merges from A:
a--a--a
/ \
o--o o <-- Both heads
\ /
b--b--b
And look, they are in sync and can go on to develop from a common base
version. Future merges will do nothing.
If, instead, you have every merge generate a commit, then you get:
a--a--a
/ \
o--o o <-- A's head
\ / \
b--b--b---o <-- B's head
a--a--a
/ \
o--o o---o <-- A's head
\ / \ /
b--b--b---o <-- B's head
a--a--a
/ \
o--o o---o <-- A's head
\ / \ / \
b--b--b---o---o <-- B's head
.. and it never ends. All of the merged commits are identical trees, but
if you insist on creating a new commit object each time, you can generate
an infinite number of bogus commits, and more to the point, A and B will
never actually agree on the current HEAD commit.
With more developers, you can make even more of a mess.
What use does the "--ff=never" option have except to generate this cruft?
Flexibility is useful only as long as it provides the ability to do
something desirable. There's no point to having a button that should
never be pushed.
next reply other threads:[~2008-03-11 9:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 9:35 colin [this message]
2008-03-11 10:09 ` [RFC/PATCH] Fast forward strategies allow, never, and only Lars Hjemli
2008-03-11 12:24 ` Bruce Stephens
2008-03-11 12:33 ` Bruce Stephens
2008-03-12 1:57 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-03-11 2:59 Sverre Hvammen Johansen
2008-03-11 3:18 ` Sverre Hvammen Johansen
2008-03-11 5:17 ` Ping Yin
2008-03-11 6:19 ` Junio C Hamano
2008-03-12 5:46 ` Sverre Hvammen Johansen
2008-03-16 6:44 ` Sverre Hvammen Johansen
2008-03-14 2:35 ` Sverre Hvammen Johansen
2008-03-11 9:15 ` Jakub Narebski
2008-03-12 4:24 ` Sverre Hvammen Johansen
2008-03-12 4:50 ` Junio C Hamano
2008-03-12 5:51 ` Sverre Hvammen Johansen
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=20080311093553.23191.qmail@science.horizon.com \
--to=colin@horizon.com \
--cc=git@vger.kernel.org \
--cc=hvammen@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).