git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Petr Baudis <pasky@suse.cz>
Cc: Stephen Hemminger <shemminger@osdl.org>,
	Jeff Garzik <jgarzik@pobox.com>,
	git@vger.kernel.org
Subject: Re: git pull for update of netdev fails.
Date: Wed, 20 Sep 2006 09:15:04 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0609200902190.4388@g5.osdl.org> (raw)
In-Reply-To: <20060920155431.GO8259@pasky.or.cz>



On Wed, 20 Sep 2006, Petr Baudis wrote:
> 
> This is really a wrong way of describing the problem - I'd say that Git
> is being difficult here.

I'm sorry, but no.

Git has been designed from the ground up for safety and security. 
Performance was one big issue, but at every turn, _integrity_ of the 
archive has always been a much more important one.

I realize that a lot of people don't think "integrity" matters. I'm sorry, 
but those people are simply wrong. In an SCM, "integrity" is the _only_ 
thing that matters. Everything else is just fluff.

> The point is, the subsystem maintainers need to maintain stacks of 
> patches and rebase against the main kernel branch regularily, and they 
> want to still publish their current state.

And git supports that.

> So it's not really any of them being strange or difficult, but Git being 
> so because it has no seamless support for tracking those branches.

It _does_ have seamless support for tracking those branches, but git had 
DAMN WELL BETTER MAKE SURE THAT NO INFORMATION GETS LOST!

That's the one and _only_ thing a SCM had better always guarantee.

The fact that very few systems guarantee it, and that you can mess around 
any which way you damn well want in most other systems, without the user 
being any wiser is a BUG in those systems. The fact that you can edit 
(and/or move around) the raw CVS files after-the-fact, and nobody will 
ever know is _bad_. That other systems allow it even today is just a 
disgrace.

We may have some bugs in git, but modulo those, I hope the design is 
actually very reliable. If you pull from some other repository, you're 
guaranteed that you won't suddenly have lost your old state just because 
the other end had a mistake.

People had better understand that git does support rebasing, but also 
understand that THAT DESTROYS HISTORY. If you don't understand that, then 
you shouldn't be told about it. Which is exactly what git does.

The thing is, if you don't understand how rebasing etc destroys history, 
you may do things like do a "git pull" or a "git merge" of a branch that 
the other side WILL THROW AWAY! That will later result in major pain, 
because when you then try to merge it later, you will get all kinds of 
nasty behaviour, because the history you merged earlier no longer matches 
the history you're now trying to merge again, and the work you merged 
earlier is simply not there any more.

See? A "git rebase" has _major_ implications for the receiving end. If git 
just silently rebased on the receiving end too, THAT WOULD BE A BUG!

Once you understand this, and you understand what it _means_, you can then 
add a "+" in your local .git/remotes/xyzzy file. But git should sure as 
hell not allow it by default. 

You may think git is being difficult, but the fact is, git is protecting 
your data integrity, and protecting your sanity. And if you don't 
understand that, then git _should_ refuse to update a branch that you may 
have depended on the old contents for, and inform you that something 
strange has happened.

All of git depends on history being append-only. The fact that you -can- 
rebase does not change that. A rebase is really "create a totally new 
branch, delete the old one, and call the new one the same name as you did 
the old one".

So it's really no different from you renaming an unrelated branch to a 
name that you already used earlier. The recipient really _should_ be told 
that the old branch is gone, and replaced with something totally 
unrelated.

			Linus

  parent reply	other threads:[~2006-09-20 16:22 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-20 15:03 git pull for update of netdev fails Stephen Hemminger
2006-09-20 15:28 ` Linus Torvalds
2006-09-20 15:54   ` Petr Baudis
2006-09-20 16:02     ` Johannes Schindelin
2006-09-20 16:07       ` Petr Baudis
2006-09-20 16:19         ` Linus Torvalds
2006-09-20 16:26           ` Linus Torvalds
2006-09-20 16:34             ` Shawn Pearce
2006-09-20 16:49               ` Linus Torvalds
2006-09-20 17:10                 ` Shawn Pearce
2006-09-20 21:23               ` Johannes Schindelin
2006-09-20 21:27                 ` Shawn Pearce
2006-09-20 21:37                   ` Johannes Schindelin
2006-09-20 21:42                     ` Junio C Hamano
2006-09-20 21:53                       ` Johannes Schindelin
2006-09-20 21:53                       ` Shawn Pearce
2006-09-20 21:49                     ` Shawn Pearce
2006-09-20 16:28           ` Shawn Pearce
2006-09-20 16:38             ` Linus Torvalds
2006-09-20 21:14           ` Johannes Schindelin
2006-09-20 21:21             ` Shawn Pearce
2006-09-20 21:27               ` Johannes Schindelin
2006-09-20 21:40                 ` Shawn Pearce
2006-09-20 22:34             ` Jakub Narebski
2006-09-23  3:44             ` Petr Baudis
2006-09-23  4:00               ` Shawn Pearce
2006-09-23  4:09                 ` Petr Baudis
2006-09-23 13:15                   ` Catalin Marinas
2006-09-23 13:10               ` Catalin Marinas
2006-09-24 20:54                 ` Petr Baudis
2006-09-25 12:47                   ` Catalin Marinas
2006-09-20 16:05     ` Junio C Hamano
2006-09-20 16:18       ` Petr Baudis
2006-09-20 16:33         ` Linus Torvalds
2006-09-20 20:01         ` Jakub Narebski
2006-09-20 16:15     ` Linus Torvalds [this message]
2006-09-20 16:59       ` Shawn Pearce
2006-09-20 17:34         ` Linus Torvalds
2006-09-20 23:12         ` Krzysztof Halasa
2006-09-23  4:18       ` Petr Baudis
2006-09-20 19:58     ` Jakub Narebski
2006-09-21  9:14       ` Johannes Schindelin
2006-09-20 19:24   ` Jeff Garzik

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=Pine.LNX.4.64.0609200902190.4388@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=jgarzik@pobox.com \
    --cc=pasky@suse.cz \
    --cc=shemminger@osdl.org \
    /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).