Index: www/fossil-v-git.wiki ================================================================== --- www/fossil-v-git.wiki +++ www/fossil-v-git.wiki @@ -34,21 +34,22 @@ Ad-hoc pile-of-files key/value database Relational SQL database Bazaar-style developmentCathedral-style development Designed for Linux kernel development Designed for SQLite development +Many contributors + Select contributors Focus on individual branches Focus on the entire tree of changes Lots of little toolsStand-alone executable One check-out per repository Many check-outs per repository Remembers what you should have done Remembers what you actually did -GPLBSD -

2.1 Feature Set

+

2.1 Feature Set

Git provides file versioning services only, whereas Fossil adds integrated [./wikitheory.wiki | wiki], [./bugtheory.wiki | ticketing & bug tracking], [./embeddeddoc.wiki | embedded documentation], @@ -72,11 +73,11 @@ the same using Git requires locating, installing, configuring, integrating, and managing a wide assortment of separate tools. Standing up a developer website using Fossil can be done in minutes, whereas doing the same using Git requires hours or days. -

2.2 Database

+

2.2 Database

The baseline data structures for Fossil and Git are the same, modulo formatting details. Both systems store check-ins as immutable objects referencing their immediate ancestors and named by a cryptographic hash of the check-in content. @@ -116,74 +117,205 @@ ([./webpage-ex.md|examples]) that show project state in ways that help developers maintain enhanced awareness and comprehension and avoid errors. -

2.3 Cathedral vs. Bazaar

- -Fossil and Git promote different development styles. Git promotes a -"[https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar|bazaar]" -development style in which numerous anonymous developers make -small and sometimes haphazard contributions. Fossil -promotes a "cathedral" development model in which the project is -closely supervised by an highly engaged architect and implemented by -a clique of developers. - -Nota Bene: This is not to say that Git cannot be used for cathedral-style -development or that Fossil cannot be used for bazaar-style development. -They can be. But those modes are not their design intent nor their -low-friction path. - -Git encourages a style in which individual developers work in relative -isolation, maintaining their -own branches and occasionally rebasing and pushing selected changes up -to the main repository. Developers using Git often have their own -private branches that nobody else ever sees. Work becomes siloed. -This is exactly what one wants when doing bazaar-style development. - -Fossil, in contrast, strives to keep all changes from all contributors -mirrored in the main repository (in separate branches) at all times. -Work in progress from one developer is readily visible to all other -developers and to the project leader, well before the code is ready -to integrate. Fossil places a lot of emphasis on reporting the state -of the project, and the changes underway by all developers, so that -all developers and especially the project leader can maintain a better -mental picture of what is happening, and better situational awareness. - -

2.4 Linux vs. SQLite

- -Git was specifically designed to support the development of the Linux kernel. -Fossil was specifically designed to support the development of SQLite. - + +

2.3 Linux vs. SQLite

+ +Fossil and Git promote different development styles because each one was +specifically designed to support the primary authors' main software +development project: [https://en.wikipedia.org/wiki/Linus_Torvalds|Linus +Torvalds] designed Git to support development of +[https://www.kernel.org/|the Linux kernel], and +[https://en.wikipedia.org/wiki/D._Richard_Hipp|D. Richard Hipp] designed +Fossil to support the development of [https://sqlite.org/|SQLite]. SQLite is much more widely deployed than the Linux kernel, but for Linux-based systems, the kernel is the more fundamental component. -Although both projects must rank high on any objective list of "most -important FOSS projects," the two projects are almost entirely unlike -one another, and this shows up in the design choices of the tools -created to support them. - -The Linux kernel uses a bazaar-style development model. There are thousands and -thousands of contributors, most of whom do not know each others names. -These thousands are responsible for producing roughly 89⨉ more code than -is in SQLite. (10.7 -[https://en.wikipedia.org/wiki/Source_lines_of_code|MLOC] vs 0.12 MLOC -according to [https://dwheeler.com/sloccount/|SLOCCount].) Git is -designed for this scenario. - -SQLite uses cathedral-style development. 95% of the code in SQLite -comes from just four programmers, and 64% of it is from the lead developer alone. -The SQLite developers know each other well and interact daily. -Fossil is designed for this development model. - -We think you should ask yourself whether you have -[https://en.wikipedia.org/wiki/Linus_Torvalds|Linus Torvalds] scale -software configuration management problems or -[https://en.wikipedia.org/wiki/D._Richard_Hipp|D. Richard Hipp] scale -problems when choosing your DVCS. You don't use a pneumatic ratchet -wrench to hang a picture on the living room wall. - -

2.5 Individual Branches vs. The Entire Change History

+Both projects must rank high on any objective list of "most +important FOSS projects," yet these two projects are almost entirely unlike +one another. + +In the following sections, we will explain how three key differences +between Linux and SQLite dictated the design of each DVCS's low-friction +usage path. + +When deciding between these two DVCSes, you should ask yourself, "Is my +project more like Linux or more like SQLite?" + + +

2.3.1 Development Organization

+ +Eric S. Raymond's seminal essay-turned-book +"[https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar|The +Cathedral and the Bazaar]" details the two major development +organization styles found in +[https://en.wikipedia.org/wiki/Free_and_open-source_software|FOSS] +projects. As it happens, Linux and SQLite fall on opposite sides of this +dichotomy. Differing development organization styles dictate a different +design and low-friction usage path in the tools created to support each +project. + +Git promotes the Linux kernel's bazaar development style, in which a +loosely-associated mass of developers contribute their work through +[https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#_dictator_and_lieutenants_workflow|a +hierarchy of lieutenants] who manage and clean up these contributions +for consideration by Linus Torvalds, who has the power to cherrypick +individual contributions into his version of the Linux kernel. Git +allows an anonymous developer to rebase and push specific locally-named +private branches, so that a Git repo clone often isn't really a clone at +all: it may have an arbitrary number of differences relative to the +repository it originally cloned from. Git encourages siloed development. +Select work in a developer's local repository may remain private +indefinitely. + +All of this is exactly what one wants when doing bazaar-style +development. + +Fossil's normal mode of operation differs on every one of these points, +with the specific designed-in goal of promoting SQLite's cathedral +development model: + + + +Where Git encourages siloed development, Fossil fights against it. +[https://en.wikipedia.org/wiki/Jim_McCarthy_(author)|Jim McCarthy] put +it well in his book on software project management, +[https://www.amazon.com/dp/0735623198/|Dynamics of Software +Development]: "[https://www.youtube.com/watch?v=oY6BCHqEbyc|Beware of a +guy in a room]." Fossil places a lot of emphasis on synchronizing +everyone's work and on reporting on the state of the project and the +work of its developers, so that everyone — especially the project leader +— can maintain a better mental picture of what is happening, leading to +better situational awareness. + +Each DVCS can be used in the opposite style, but doing so works against +their low-friction paths. + + +

2.3.2 Scale

+ +The Linux kernel has a far bigger developer community than that of +SQLite: there are thousands and thousands of contributors to Linux, most +of whom do not know each others names. These thousands are responsible +for producing roughly 89⨉ more code than is in SQLite. (10.7 +[https://en.wikipedia.org/wiki/Source_lines_of_code|MLOC] vs. 0.12 MLOC +according to [https://dwheeler.com/sloccount/|SLOCCount].) The Linux +kernel and its development process were already uncommonly large back in +2005 when Git was designed, specifically to support the consequences of +having such a large set of developers working on such a large code base. + +95% of the code in SQLite comes from just four programmers, and 64% of +it is from the lead developer alone. The SQLite developers know each +other well and interact daily. Fossil was designed for this development +model. As well, we think the fact of Fossil's birth a year later +than Git allowed it to learn from some of the key design mistakes in +Git. + +We think you should ask yourself whether you have Linus Torvalds scale +software configuration management problems or D. Richard Hipp scale +problems when choosing your DVCS. An +[https://en.wikipedia.org/wiki/Impact_wrench|automotive air impact +wrench] running at 8000 RPM driving an M8 socket-cap bolt at 16 cm/s is +not the best way to hang a picture on the living room wall. + + +

2.3.3 Accepting Contributions

+ +As of this writing, Git has received about 4.5⨉ as many commits as +Fossil resulting in about 2.5⨉ as many lines of source code. The line +count excludes tests and in-tree third-party dependencies. It does not +exclude the default GUI for each, since it's integral for Fossil, so we +count the size of gitk in this. + +It is obvious that Git is bigger in part because of its first-mover +advantage, which resulted in a larger user community, which results in +more contributions. But is that the only reason? We believe there +are other relevant differences that also play into this which fall out +of the "Linux vs. SQLite" framing: licensing, community structure, and +how we react to +[https://www.jonobacon.com/2012/07/25/building-strong-community-structural-integrity/|drive-by +contributions]. In brief, it's harder to get a new feature into Fossil +than into Git. + +A larger feature set size is not necessarily a good thing. Git's command line +interface is famously arcane. Masters of the arcane are able to do +wizardly things, but only by studying their art deeply for years. This +strikes us as a good thing only in cases where use of the tool itself is +the primary point of that user's work. + +Most DVCS users are not using a DVCS for its own sake, so we do not want +the DVCS with the most features, we want the one with a more easily +internalized behavior set, which we can pick up, use quickly, and then +set aside in order to get back to our +actual job as quickly as possible. There is some minimal set of features +required to achieve that, but there is a level beyond which more +features only slow us down while we're learning about the DVCS, as we +must plow through documentation on features we're not likely to ever +use. When the number of features grows +to the point where people of normal motivation cannot spend the time to +master them all, you make the tool less productive to use. + +We achieve this balance between feature set size and ease of use by +carefully choosing which users to give commit bits to, then in being +choosy about which of the contributed feature branches to merge down to +trunk. + +The end result is that Fossil more closely adheres to +[https://en.wikipedia.org/wiki/Principle_of_least_astonishment|the +principle of least astonishment] than Git does. + + +

2.4 Individual Branches vs. The Entire Change History

Both Fossil and Git store history as a directed acyclic graph (DAG) of changes, but Git tends to focus more on individual branches of the DAG, whereas Fossil puts more emphasis on the entire DAG. @@ -207,11 +339,12 @@ with just a handful of active committers. Seeing all changes on all branches all at once helps keep the whole team up-to-date with what everybody else is doing, resulting in a more tightly focused and cohesive implementation. -

2.6 Lots of little tools vs. Self-contained system

+ +

2.5 Lots of little tools vs. Self-contained system

Git consists of many small tools, each doing one small part of the job, which can be recombined (by experts) to perform powerful operations. Git has a lot of complexity and many dependencies and requires an "installer" script or program to get it running. @@ -225,11 +358,12 @@ small tools that collaborate to get the job done. The designer of Fossil says that the Unix philosophy is "It just works." Both individuals have written their DVCSes to reflect their own view of the "Unix philosophy." -

2.7 One vs. Many Check-outs per Repository

+ +

2.6 One vs. Many Check-outs per Repository

A "repository" in Git is a pile-of-files in the ".git" subdirectory of a single check-out. The check-out and the repository are located together in the filesystem. @@ -256,11 +390,12 @@ Fossil to have a check-out tree for each major working branch so that you can switch branches with a "cd" command rather than replace the current working file set with a different file set by updating in place, as Git prefers. -

2.8 What you should have done vs. What you actually did

+ +

2.7 What you should have done vs. What you actually did

Git puts a lot of emphasis on maintaining a "clean" check-in history. Extraneous and experimental branches by individual developers often never make it into the main repository. And branches are often rebased before being pushed, to make @@ -277,48 +412,12 @@ is not a factor. One commentator has mused that Git records history according to the victors, whereas Fossil records history as it actually happened. -

2.9 GPL vs. BSD

- -Git is covered by the GPL license whereas Fossil is covered by -[https://fossil-scm.org/fossil/file/COPYRIGHT-BSD2.txt|a two-clause BSD -style license]. - -Consider the difference between GPL and BSD licenses: GPL is designed -to make writing easier at the expense of making reading harder. BSD is -designed to make reading easier at the expense of making writing harder. - -To a first approximation, the GPL license grants the right to read -source code to anyone who promises to give back enhancements. In other -words, the act of reading GPL source code (a prerequiste for making changes) -implies acceptance of the license which requires updates to be contributed -back under the same license. (The details are more complex, but the -foregoing captures the essence of the idea.) A big advantage of the GPL -is that anybody can contribute to the code without having to sign additional -legal documentation because they have implied their acceptance of the GPL -license by the very act of reading the source code. This means that a GPL -project can legally accept anonymous and drive-by patches. - -The BSD licenses, on the other hand, make reading much easier than the GPL, -because the reader need not surrender proprietary interest -in their own enhancements. On the flip side, BSD and similarly licensed -projects must obtain legal affidavits from authors before -new content can be added into the project. Anonymous and drive-by -patches cannot be accepted. This makes signing up new contributors for -BSD licensed projects harder. - -The licenses on the implementations of Git and Fossil only apply to the -implementations themselves, not to the projects which the systems store. -Nevertheless, one can see a more GPL-oriented world-view in Git and a -more BSD-oriented world-view in Fossil. Git encourages anonymous contributions -and siloed development, which are hallmarks of the GPL/bazaar approach to -software, whereas Fossil encourages a more tightly collaborative, -cliquish, cathedral-style approach more typical of BSD-licensed projects. - -

3.0 Missing Features

+ +

3.0 Missing Features

Most of the capabilities found in Git are also available in Fossil and the other way around. For example, both systems have local check-outs, remote repositories, push/pull/sync, bisect capabilities, and a "stash." Both systems store project history as a directed acyclic graph (DAG) @@ -325,11 +424,12 @@ of immutable check-in objects. But there are a few capabilities in one system that are missing from the other. -

3.1 Features found in Fossil but missing from Git

+ +

3.1 Features found in Fossil but missing from Git

* The ability to show descendents of a check-in. Both Git and Fossil can easily find the ancestors of a check-in. But only Fossil shows the descendents. (It is possible to find the @@ -364,11 +464,11 @@ Fossil supports an integrated web interface. Some of the same features are available using third-party add-ons for Git, but they do not provide nearly as many features and they are not nearly as convenient to use. -

3.2 Features found in Git but missing from Fossil

+

3.2 Features found in Git but missing from Fossil

* Rebase Because of its emphasis on recording history exactly as it happened, rather than as we would have liked it to happen, Fossil deliberately