git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-rev-list in local commit order

From
Linus Torvalds <torvalds@osdl.org>
Date
May 17, 2005, 15:43 UTC
Message-ID
<Pine.LNX.4.58.0505170833330.18337@ppc970.osdl.org>
In-Reply-To
<1116323520.17296.12.camel@tglx.tec.linutronix.de>
On Tue, 17 May 2005, Thomas Gleixner wrote:
> 
> What you blow away is a work space. But at the end you push the result
> of whatever work space you kept into a public available repository. Also
> BK stores a somewhat hidden repository (not workspace) id.
No.

The public repo is secondary. Really. It has no meaning. The only thing that matters is what you call "workspace".

> My idea of repository id was not the notion of workspace seperation. I
> dont care in which directory and on which machine you or who ever
> commits a line of code. I care where the change appears in a public
> repository, which is unique.

You seem to think that the repository on master.kernel.org is more important than the one on my private machine, and you're _wrong_.

It's the _private_ repositories that are the important ones. The public ones are a communication channel, nothing more. They have no importance on their own.

I've blown the public one away several times. With BK, we've had disk corruption on kernel.org, we've had break-ins on bkbits.net, and we've had repository corruption due to people editing the SCCS files by hand. Any number of silly problems, in other words. The result? Blow the public tree away, restore it from one of the private ones from a machine that you trust.

I _never_ look at my public tree. I literally have a small script called "push-all" in my git repositories, and it does:

	#!/bin/sh
	echo master.kernel.org:
	rsync -av --delete --exclude-from=.exclude .git/ master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
	...
ie it just pushes my stuff to a few other places.

In other words, the public stuff is the _slave_. It has no meaning. The only important one is the one that the _developer_ works on.

Of course, this is not to say that everybody needs to take my approach. The nice thing about distributed systems is that a centralized system is just a trivial special case of them, so somebody else, who uses git as if it were CVS, could say "repo xxxx at git-master:/pub/git-root/project is the 'main' repository, and all the workspaces are just temporary workspaces".

But from a git _design_ point (and from a kernel usage point), the belief that a "workspace" is somehow less important than a "central repository" is just very very very wrong. Each workspace is it's own repository, and it's the _local_ ones that matter, not some "central repository".

		Linus
Previous: Thomas GleixnerNext: Thomas Gleixner
Message 14 of 17 in “git-rev-list in local commit order”
  1. SeanMay 14, 2005
  2. Thomas GleixnerMay 15, 2005
  3. SeanMay 15, 2005
  4. Thomas GleixnerMay 15, 2005
  5. SeanMay 15, 2005
  6. Thomas GleixnerMay 15, 2005
  7. SeanMay 15, 2005
  8. Thomas GleixnerMay 15, 2005
  9. SeanMay 15, 2005
  10. Thomas GleixnerMay 15, 2005
  11. SeanMay 16, 2005
  12. Linus TorvaldsMay 16, 2005
  13. Thomas GleixnerMay 17, 2005
  14. Linus TorvaldsMay 17, 2005
  15. Thomas GleixnerMay 17, 2005
  16. Linus TorvaldsMay 17, 2005
  17. Jon SeymourMay 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.