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

Re: git versus CVS (versus bk)

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 31, 2005, 02:35 UTC
Message-ID
<Pine.LNX.4.64.0510301811390.27915@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0510301720390.14972@x2.ybpnyarg>
On Sun, 30 Oct 2005, walt wrote:
>
> My memory is playing tricks on me.  I seem to remember running linux
> in the 1980's, but the earliest kernel I can find on kernel.org is
> dated 1994.  Maybe I'm remembering xenix...dunno.

-91 was the first version. It was usable (depending on your definition of "usable" ;) in early -92.

> Could someone explain to me the shortcomings of CVS which prompted
> the development of bk (and then git) -- in a way that a non-developer
> like me can understand?

It's really not very easy to explain why CVS sucks. After all, sometimes people who have used it for decades have a hard time understanding the suckiness.

I've used CVS for "real work" at Transmeta, and hey, it worked well enough. When you have groups of just a couple of tens of people max, and very strict rules on how to do things, and you trust everybody, CVS works fine. It starts to really show its problems whenever you need to work remotely, but there are things you can do to make the pain less.

A lot of CVS people will tell you that it sucks because it can't do renames, and because certain operations take forever (tagging etc). That's only superficially true, and it is really a suckiness that comes from some implementation issues.

SVN fixes (supposedly) those "implementation suckiness" issues. It does so largely by doing a much better database, which allows it to do certain things much more efficiently. Personally that part scares me, since I think it's also a much more fragile setup and there's apparently been people who lost their entire database to corruption (something that is very hard to do with CVS, since the "database" is so weak), but that's a different issue.

But the things that SVN fixes are not the things that really matter in the end. SVN i sa better CVS, but it still has all the basic fundamental problems. Namely the fact that it's centralized.

The problem with a centralized model is that there's one point of contact: you can replicate the central database endlessly, but you can only really modify it in one place. Which means that anybody who wants to modify anything at all needs to have write access to that one repository.

Now, you can limit write access in various ways ("user xyz can only write to these files"), but it still requires an a-priori trust network rather than a dynamic one. So every single CVS project (and SVN does zero in this regard) always ends up having politics around the question of who gets commit privileges, and what the rules for them are.

So one of the worst downsides of CVS is _politics_. People, not technology.

The other implication of centralization is the fact that it means that you can't do any off-line work. You need to be able to access the central database in order to do real work. You can replicate the repository and try to take it with you and then back-port whatever changes you did when you come back, but more commonly it means that when you go off with a laptop, you're either in read-only mode, or you need to have an internet connection whenever you want to do development. That's just nasty.

The upside of centralization is that a lot of things are easier. Easier to think about, easier to get a stupid and straightforward idea working.

But if you have hundreds of developers, and you have a dynamic trust network (I trust some people, they trust others, and we all tend to trust people more or less depending on what they work on), the CVS model is absolutely HORRID. It just doesn't work.

Git does all of that right. So did BK, for that matter. There's no a-priori "these people can commit", because there's no central database. There's no problem with off-line work, because every repository is totally self-contained and independent of every other one.

			Linus
Previous: H. Peter AnvinNext: Johannes Schindelin
Message 4 of 61 in “git versus CVS (versus bk)”
  1. waltOct 31, 2005
  2. Martin LanghoffOct 31, 2005
  3. H. Peter AnvinOct 31, 2005
  4. Linus TorvaldsOct 31, 2005
  5. Johannes SchindelinOct 31, 2005
  6. Linus TorvaldsOct 31, 2005
  7. wa1ter@myrealbox.comOct 31, 2005
  8. Randal L. SchwartzOct 31, 2005
  9. waltOct 31, 2005
  10. Daniel BarkalowNov 1, 2005
  11. Linus TorvaldsNov 1, 2005
  12. Joel BeckerOct 31, 2005
  13. Martin LanghoffOct 31, 2005
  14. Joel BeckerOct 31, 2005
  15. Petr BaudisNov 1, 2005
  16. Joel BeckerNov 1, 2005
  17. Petr BaudisNov 1, 2005
  18. Petr BaudisNov 7, 2005
  19. Josef WeidendorferNov 8, 2005
  20. Petr BaudisNov 8, 2005
  21. Randal L. SchwartzNov 1, 2005
  22. Linus TorvaldsNov 1, 2005
  23. Randal L. SchwartzNov 1, 2005
  24. Linus TorvaldsNov 1, 2005
  25. Junio C HamanoNov 1, 2005
  26. Junio C HamanoOct 31, 2005
  27. Joel BeckerOct 31, 2005
  28. Linus TorvaldsOct 31, 2005
  29. Junio C HamanoOct 31, 2005
  30. Joel BeckerOct 31, 2005
  31. Junio C HamanoNov 1, 2005
  32. Joel BeckerNov 1, 2005
  33. Martin LanghoffNov 1, 2005
  34. Joel BeckerNov 1, 2005
  35. Linus TorvaldsNov 1, 2005
  36. Petr BaudisNov 1, 2005
  37. Catalin MarinasNov 1, 2005
  38. Theodore Ts'oNov 1, 2005
  39. hgmq vs. StGITPetr Baudis, Nov 1, 2005
  40. Catalin MarinasNov 1, 2005
  41. Petr BaudisNov 1, 2005
  42. Catalin MarinasNov 1, 2005
  43. Chuck LeverNov 1, 2005
  44. Chris MasonNov 1, 2005
  45. Catalin MarinasNov 1, 2005
  46. Chris MasonNov 1, 2005
  47. Catalin MarinasNov 1, 2005
  48. Chris MasonNov 2, 2005
  49. Catalin MarinasNov 5, 2005
  50. Petr BaudisNov 9, 2005
  51. Pavel MachekNov 10, 2005
  52. Catalin MarinasNov 10, 2005
  53. Chris MasonNov 1, 2005
  54. Linus TorvaldsNov 1, 2005
  55. Catalin MarinasNov 1, 2005
  56. Catalin MarinasNov 1, 2005
  57. Chris MasonNov 1, 2005
  58. Catalin MarinasNov 1, 2005
  59. Daniel BarkalowNov 1, 2005
  60. Linus TorvaldsOct 31, 2005
  61. wa1ter@myrealbox.comOct 31, 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.