Documentation Source Text

Artifact [16988a2f2d]
Login

Artifact 16988a2f2d9c8a7627276ee04f8e5b2af6e8d37b8b525cfddc7c62c5dd277fd8:


<title>Why SQLite Does Not Use Git?</title>

<table_of_contents>

<h1>Introduction</h1>

<p>
SQLite does not use the
[https://git-scm.org|Git] version control system.
SQLite uses
[https://fossil-scm.org/|Fossil] instead.
Fossil and Git are both block-chain version-control systems.
They are both "distributed".  They both store content has a 
sequence of immutable check-ins identified by a cryptographic
hash.  Git is wildly popular, to the point that many younger
developers are familiar with nothing else.  And yet, the developers
of SQLite prefer Fossil.  This article tries to explain why.

<h1>A Few Reasons Why SQLite Does Not Use Git</h1>

<ol>
<li><p>
With Git, it is very difficult to find the successors (decendents) of
a check-in.

<p>
Git allows you to go backwards in time.  Given the latest
check-in on a branch, Git lets you see all the ancestors of that
check-in.  But Git makes it very difficult to move in the other
direction.  Given some historical check-in, it is quite challenging
in Git to find out what came next.  It can be done, but it is sufficiently
difficult and slow that nobody ever does it.  There is no button in
GitHub that shows the descendents of a check-in.

<p>
This is a deal-breaker, a show-stopper.  The principle maintainer
of SQLite cannot function effectively without being able to view
the successors of a check-in.  This one issue is sufficient reason
to not use Git, in the view of the designer of SQLite.

<li><p>
The mental model for Git is needlessly complex and consequently
distracts attention from software under development.  A user of Git
needs to keep all of the following in mind:
<ol type='a'>
<li> The working directory
<li> The "index" or staging area
<li> The local head
<li> The local copy of the remote head
<li> The actual remote head
</ol>
<p>
Git contains commands (or options on commands) for moving and
comparing content between all of these locations. 

<p>In contrast,
Fossil users only need to think about their working directory and
the check-in they are working on.  That is 60% less distraction.
Every developer has a finite number of brain-cycles.  Fossil
requires fewer brain-cycles to operate, thus freeing up 
intellectual resources to focus on the software under development.

<li><p>
Git does not track branch history.  This makes review of historical
branches tedious.

<p>
As an example, consider display of a single historical
branch of SQLite as rendered by GitHub and by Fossil:

<ul>
<li><b>GitHub:</b> [https://github.com/mackyle/sqlite/commits/prefer-coroutine-sort-subquery]
<li><b>Fossil:</b> [https://sqlite.org/src/timeline?r=prefer-coroutine-sort-subquery]
</ul>

<p>
The Fossil view clearly shows that the branch was eventually merged back into
trunk.  It shows where the branch started, and it shows two occasions where changes
on trunk were merged into the branch.  GitHub shows none of this.  In fact, the
GitHub display is mostly useless in trying to figure out what happened.

<li><p>
Git lacks native wiki and bug tracking.
If you want these essential features, you have to install additional software
such as GitLab, or else use a third-party service such as GitHub.  And even
then, the wiki and bug reports are centralized, not distributed.

<li><p>
Git requires more administrative support.
Setting up a website for a project to use Git requires a lot more software,
and a lot more work, than setting up a similar site with an integrated package
like Fossil.

<li><p>Nobody really understands Git.
<img src="https://www.fossil-scm.org/fossil/doc/trunk/www/xkcd-git.gif"><br>
(credit: [https://xkcd.com/1597/])
</ol>

<h2>See Also</h2>

<p>Other pages that talk about Fossil and Git include:
<ul>
<li><p>[https://fossil-scm.org/fossil/doc/trunk/www/fossil-v-git.wiki|Fossil vs. Git]
<li><p>[https://www.fossil-scm.org/fossil/doc/trunk/www/quotes.wiki|What others say about Fossil and Git]
</ul>

<h1>A Git-User's Guide To Accessing SQLite Source Code</h1>

<p>
If you are a devoted Git user and have no intention of changing,
you can still easily access SQLite.  This section gives some hints
on how to do so.

<h2>GitHub Mirrors</h2>

<p>
There is a mirror of the SQLite source tree on GitHub at
[https://github.com/mackyle/sqlite].  This mirror is maintained
by user "mackyle" who is unaffiliated with, and unknown to,
the official SQLite development team.  We do not know mackyle,
but we observe that he does a terrific job of keeping his mirror
current, and so if you want to access the SQLite source code on
GitHub, his mirror is the recommended source.

<h2>Web Access</h2>

<p>
The [https://sqlite.org/src/timeline|SQLite Fossil Repository] contains links
for downloading  a Tarball, ZIP Archive, or [SQLite Archive] for any
historical version of SQLite.  The URLs for these downloads are
simple and can be incorporated easily into automated tools.  The format is:

<center>
<tt>https://sqlite.org/src/tarball/</tt><i>VERSION</i><tt>/sqlite.tar.gz</tt>
</center>

<p>
Simply replace <i>VERSION</i> with some description of the version to be
downloaded.  The <i>VERSION</i> can be a prefix of the cryptographic hash
name of a specific check-in, or the name of a branch (in which case the
most recent version of the branch is fetched) or a tag for a specific
check-in like "version-3.23.0".

<h2>Fossil Access</h2>

<p>
Fossil is really easy to install and use.  Here are the steps for unix.
(Windows is similar.)

<ol>
<li>
Download the self-contained Fossil executable from
[https://fossil-scm.org/fossil/uv/download.html] and put the executable
somewhere on your $PATH.
<li><tt>mkdir ~/fossils</tt>
<li><tt>fossil clone https://fossil-scm.org/fossil ~/fossils/sqlite.fossil</tt>
<li><tt>mkdir ~/sqlite; cd ~/sqlite</tt>
<li><tt>fossil open ~/sqlite.fossil .</tt>
</ol>

<p>
Subsequently, to update your check-out, simply type:

<blockquote>
<tt>fossil up </tt><i>VERSION</i>
</blockquote>

<p>
Use "trunk" for version to get the latest trunk version of SQLite.
Or use a prefix of a cryptographic hash name, or the name of some branch
or tag.

<p>
Use the "<tt>fossil ui</tt>" command from within the ~/sqlite checkout to
bring up a local copy of the website.