From: Linus Torvalds <torvalds@linux-foundation.org>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: "David Brown" <git@davidb.org>,
"Björn Steinbrink" <B.Steinbrink@gmx.de>,
git@vger.kernel.org
Subject: Re: Cherry picking instead of merges.
Date: Fri, 4 Jul 2008 09:47:49 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0807040939150.2815@woody.linux-foundation.org> (raw)
In-Reply-To: <486DC4F2.70608@viscovery.net>
On Fri, 4 Jul 2008, Johannes Sixt wrote:
>
> FWIW, the same thing in different words is written in section
>
> "Why bisecting merge commits can be harder than bisecting linear history"
>
> of Documentation/user-manual.txt.
I don't think that's the same thign at all.
That section basically says "just keep things linear". Which I very much
disagree with. Trying to keep things linear just doesn't work if you work
together with other people - since you have to rewrite history.
So my argument was the exact _reverse_. Don't try to keep things linear,
because it doesn't _work_ right. Do the merges. They will very seldom
cause subtle merge problems (non-subtle ones are much more common, but
trivial to handle), and they will mean that you can work effectively
togethr with other people.
And then, _if_ you have a merge that you really cannot figure out why it
breaks, at that point you can _temporarily_ linearize the git history
after-the-fact just as easily as you would ever have done before-the-fact.
In other words: linearization throws away real and useful information. You
can always linearize afterwards for bisection purposes or whatever, but
you can never _un_linearize because you've thrown away the information.
So it's much better to just do merges and keep the history, and then there
are ways to rewrite the history later if you really need it.
That said - I think it's good practice and perfectly sane to do things
like git-rebase to rewrite the history in a _private_ tree that contains
only your own modifications and has never been public (where "applied
emailed patches from others" still counts as your own work).
The "don't linearize" mantra really only is about commits that have ever
been in anybody elses repository (and whether they _came_ from there, or
whether they came from you but were public to others is immaterial).
Linus
next prev parent reply other threads:[~2008-07-04 16:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 18:26 Cherry picking instead of merges David Brown
2008-07-03 20:13 ` Alex Riesen
2008-07-03 20:15 ` Avery Pennarun
2008-07-03 20:53 ` David Brown
2008-07-03 21:18 ` Samuel Tardieu
2008-07-03 21:18 ` Linus Torvalds
2008-07-03 22:39 ` David Brown
2008-07-04 0:10 ` Björn Steinbrink
2008-07-04 4:40 ` David Brown
2008-07-04 5:30 ` Linus Torvalds
2008-07-04 6:36 ` Johannes Sixt
2008-07-04 16:47 ` Linus Torvalds [this message]
2008-07-04 0:39 ` Linus Torvalds
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=alpine.LFD.1.10.0807040939150.2815@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=B.Steinbrink@gmx.de \
--cc=git@davidb.org \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
/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).