| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 4 |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
| 5 |
<link href="sqlite.css" rel="stylesheet"> |
| 6 |
<title>Why SQLite Does Not Use Git</title> |
| 7 |
<!-- path= --> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
<div class=nosearch> |
| 11 |
<a href="index.html"> |
| 12 |
<img class="logo" src="images/sqlite370_banner.svg" alt="SQLite" border="0"> |
| 13 |
</a> |
| 14 |
<div><!-- IE hack to prevent disappearing logo --></div> |
| 15 |
<div class="tagline desktoponly"> |
| 16 |
Small. Fast. Reliable.<br>Choose any three. |
| 17 |
</div> |
| 18 |
<div class="menu mainmenu"> |
| 19 |
<ul> |
| 20 |
<li><a href="index.html">Home</a> |
| 21 |
<li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a> |
| 22 |
<li class='wideonly'><a href='about.html'>About</a> |
| 23 |
<li class='desktoponly'><a href="docs.html">Documentation</a> |
| 24 |
<li class='desktoponly'><a href="download.html">Download</a> |
| 25 |
<li class='wideonly'><a href='copyright.html'>License</a> |
| 26 |
<li class='desktoponly'><a href="support.html">Support</a> |
| 27 |
<li class='desktoponly'><a href="prosupport.html">Purchase</a> |
| 28 |
<li class='search' id='search_menubutton'> |
| 29 |
<a href="javascript:void(0)" onclick='toggle_search()'>Search</a> |
| 30 |
</ul> |
| 31 |
</div> |
| 32 |
<div class="menu submenu" id="submenu"> |
| 33 |
<ul> |
| 34 |
<li><a href='about.html'>About</a> |
| 35 |
<li><a href='docs.html'>Documentation</a> |
| 36 |
<li><a href='download.html'>Download</a> |
| 37 |
<li><a href='support.html'>Support</a> |
| 38 |
<li><a href='prosupport.html'>Purchase</a> |
| 39 |
</ul> |
| 40 |
</div> |
| 41 |
<div class="searchmenu" id="searchmenu"> |
| 42 |
<form method="GET" action="search"> |
| 43 |
<select name="s" id="searchtype"> |
| 44 |
<option value="d">Search Documentation</option> |
| 45 |
<option value="c">Search Changelog</option> |
| 46 |
</select> |
| 47 |
<input type="text" name="q" id="searchbox" value=""> |
| 48 |
<input type="submit" value="Go"> |
| 49 |
</form> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
<script> |
| 53 |
function toggle_div(nm) { |
| 54 |
var w = document.getElementById(nm); |
| 55 |
if( w.style.display=="block" ){ |
| 56 |
w.style.display = "none"; |
| 57 |
}else{ |
| 58 |
w.style.display = "block"; |
| 59 |
} |
| 60 |
} |
| 61 |
function toggle_search() { |
| 62 |
var w = document.getElementById("searchmenu"); |
| 63 |
if( w.style.display=="block" ){ |
| 64 |
w.style.display = "none"; |
| 65 |
} else { |
| 66 |
w.style.display = "block"; |
| 67 |
setTimeout(function(){ |
| 68 |
document.getElementById("searchbox").focus() |
| 69 |
}, 30); |
| 70 |
} |
| 71 |
} |
| 72 |
function div_off(nm){document.getElementById(nm).style.display="none";} |
| 73 |
window.onbeforeunload = function(e){div_off("submenu");} |
| 74 |
/* Disable the Search feature if we are not operating from CGI, since */ |
| 75 |
/* Search is accomplished using CGI and will not work without it. */ |
| 76 |
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){ |
| 77 |
document.getElementById("search_menubutton").style.display = "none"; |
| 78 |
} |
| 79 |
/* Used by the Hide/Show button beside syntax diagrams, to toggle the */ |
| 80 |
function hideorshow(btn,obj){ |
| 81 |
var x = document.getElementById(obj); |
| 82 |
var b = document.getElementById(btn); |
| 83 |
if( x.style.display!='none' ){ |
| 84 |
x.style.display = 'none'; |
| 85 |
b.innerHTML='show'; |
| 86 |
}else{ |
| 87 |
x.style.display = ''; |
| 88 |
b.innerHTML='hide'; |
| 89 |
} |
| 90 |
return false; |
| 91 |
} |
| 92 |
var antiRobot = 0; |
| 93 |
function antiRobotGo(){ |
| 94 |
if( antiRobot!=3 ) return; |
| 95 |
antiRobot = 7; |
| 96 |
var j = document.getElementById("mtimelink"); |
| 97 |
if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href"); |
| 98 |
} |
| 99 |
function antiRobotDefense(){ |
| 100 |
document.body.onmousedown=function(){ |
| 101 |
antiRobot |= 2; |
| 102 |
antiRobotGo(); |
| 103 |
document.body.onmousedown=null; |
| 104 |
} |
| 105 |
document.body.onmousemove=function(){ |
| 106 |
antiRobot |= 2; |
| 107 |
antiRobotGo(); |
| 108 |
document.body.onmousemove=null; |
| 109 |
} |
| 110 |
setTimeout(function(){ |
| 111 |
antiRobot |= 1; |
| 112 |
antiRobotGo(); |
| 113 |
}, 100) |
| 114 |
antiRobotGo(); |
| 115 |
} |
| 116 |
antiRobotDefense(); |
| 117 |
</script> |
| 118 |
<div class=fancy> |
| 119 |
<div class=nosearch> |
| 120 |
<div class="fancy_title"> |
| 121 |
Why SQLite Does Not Use Git |
| 122 |
</div> |
| 123 |
<details class="fancy_toc"> |
| 124 |
<summary>Table Of Contents</summary> |
| 125 |
<div id="toc_sub"><div class="fancy-toc1"><a href="#introduction">1. Introduction</a></div> |
| 126 |
<div class="fancy-toc2"><a href="#edits">1.1. Edits</a></div> |
| 127 |
<div class="fancy-toc1"><a href="#a_few_reasons_why_sqlite_does_not_use_git">2. A Few Reasons Why SQLite Does Not Use Git</a></div> |
| 128 |
<div class="fancy-toc2"><a href="#git_does_not_provide_good_situational_awareness">2.1. Git does not provide good situational awareness</a></div> |
| 129 |
<div class="fancy-toc2"><a href="#git_makes_it_difficult_to_find_successors_descendants_of_a_check_in">2.2. Git makes it difficult to find successors (descendants) |
| 130 |
of a check-in</a></div> |
| 131 |
<div class="fancy-toc2"><a href="#the_mental_model_for_git_is_needlessly_complex">2.3. The mental model for Git is needlessly complex</a></div> |
| 132 |
<div class="fancy-toc2"><a href="#git_does_not_track_historical_branch_names">2.4. Git does not track historical branch names</a></div> |
| 133 |
<div class="fancy-toc2"><a href="#git_requires_more_administrative_support">2.5. Git requires more administrative support</a></div> |
| 134 |
<div class="fancy-toc2"><a href="#git_provides_a_poor_user_experience">2.6. Git provides a poor user experience</a></div> |
| 135 |
<div class="fancy-toc1"><a href="#a_git_user_s_guide_to_accessing_sqlite_source_code">3. A Git-User's Guide To Accessing SQLite Source Code</a></div> |
| 136 |
<div class="fancy-toc2"><a href="#the_official_github_mirror">3.1. The Official GitHub Mirror</a></div> |
| 137 |
<div class="fancy-toc2"><a href="#web_access">3.2. Web Access</a></div> |
| 138 |
<div class="fancy-toc2"><a href="#fossil_access">3.3. Fossil Access</a></div> |
| 139 |
<div class="fancy-toc2"><a href="#verifying_source_code_integrity">3.4. Verifying Source Code Integrity</a></div> |
| 140 |
<div class="fancy-toc1"><a href="#see_also">4. See Also</a></div> |
| 141 |
</div> |
| 142 |
</details> |
| 143 |
</div> |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
<h1 id="introduction"><span>1. </span>Introduction</h1> |
| 149 |
|
| 150 |
<p> |
| 151 |
SQLite does not use the |
| 152 |
<a href="https://git-scm.org">Git</a> version control system. |
| 153 |
SQLite uses |
| 154 |
<a href="https://fossil-scm.org/">Fossil</a> instead, which is a |
| 155 |
version control system that was specifically designed |
| 156 |
and written to support SQLite. |
| 157 |
|
| 158 |
</p><p> |
| 159 |
People often wonder why SQLite does not use the |
| 160 |
<a href="https://git-scm.org">Git</a> version control system like everybody |
| 161 |
else. |
| 162 |
This article attempts to answer that question. Also, |
| 163 |
in <a href="#getthecode">section 3</a>, |
| 164 |
this article provides hints to Git users |
| 165 |
about how they can easily access the SQLite source code. |
| 166 |
|
| 167 |
</p><p> |
| 168 |
This article is <u>not</u> a comparison between Fossil |
| 169 |
and Git. See |
| 170 |
<a href="https://fossil-scm.org/fossil/doc/trunk/www/fossil-v-git.wiki">https://fossil-scm.org/fossil/doc/trunk/www/fossil-v-git.wiki</a> |
| 171 |
for one comparison of the two systems. Other third-party |
| 172 |
comparisons are available as well - use a search engine to find them. |
| 173 |
|
| 174 |
</p><p> |
| 175 |
This article is <u>not</u> advocating that you switch your projects |
| 176 |
away from Git. You can use whatever version control system you want. |
| 177 |
If you are perfectly happy with Git, then by all means keep using |
| 178 |
Git. But, if Git is not working well for you or you are wondering |
| 179 |
if it can be improved or if there is something better, |
| 180 |
then maybe try to understand the perspectives presented below. |
| 181 |
Use the insights thus obtained to find or write a different and |
| 182 |
better version control system, or to just make |
| 183 |
improvements to Git itself. |
| 184 |
|
| 185 |
</p><h2 id="edits"><span>1.1. </span>Edits</h2> |
| 186 |
|
| 187 |
<p> |
| 188 |
This article has been revised multiple times in an attempt |
| 189 |
to improve clarity, address concerns and misgivings, |
| 190 |
and to fix errors. |
| 191 |
The complete edit history for this document can be seen at |
| 192 |
<a href="https://sqlite.org/docsrc/finfo/pages/whynotgit.in">https://sqlite.org/docsrc/finfo/pages/whynotgit.in</a>. |
| 193 |
(Usage hint: Click on any two nodes of the graph for a diff. |
| 194 |
BTW, are there any Git web interfaces that offers a similar |
| 195 |
capability?) |
| 196 |
|
| 197 |
</p><h1 id="a_few_reasons_why_sqlite_does_not_use_git"><span>2. </span>A Few Reasons Why SQLite Does Not Use Git</h1> |
| 198 |
|
| 199 |
<h2 id="git_does_not_provide_good_situational_awareness"><span>2.1. </span>Git does not provide good situational awareness</h2> |
| 200 |
|
| 201 |
<p> |
| 202 |
When I want to see what has been happening on SQLite, I visit the |
| 203 |
<a href="https://sqlite.org/src/timeline">timeline</a> and in a single |
| 204 |
screen I see a summary of the latest changes, on all branches. |
| 205 |
In a few clicks, I can drill down for as much detail as I |
| 206 |
want. I can even do this from a phone. |
| 207 |
|
| 208 |
</p><p> |
| 209 |
GitHub and GitLab offer nothing comparable. The closest I have |
| 210 |
found is the <a href="https://github.com/sqlite/sqlite/network">network</a>, |
| 211 |
which is slow to render (unless it is already cached), does not |
| 212 |
offer nearly as much details, and scarcely works at all on mobile. |
| 213 |
The <a href="https://github.com/sqlite/sqlite/commits/master">commits</a> view |
| 214 |
of GitHub provides more detail, renders quickly, |
| 215 |
and works on mobile, but only shows a single branch at a time, |
| 216 |
so I cannot easily know if I've seen all of the recent changes. |
| 217 |
And even if GitHub/GitLab did offer better interfaces, both are |
| 218 |
third-party services. They are not a core part of Git. Hence, |
| 219 |
using them introduces yet another dependency into the project. |
| 220 |
|
| 221 |
</p><p> |
| 222 |
I am told that Git users commonly install third-party graphical |
| 223 |
viewers for Git, many of which do a better job of showing recent |
| 224 |
activity on the project. That is great, but these are still |
| 225 |
more third-party applications that must be installed and |
| 226 |
managed separately. Many are platform-specific. (One of the |
| 227 |
better ones, <a href="https://gitup.co/">GitUp</a>, only works on Mac, for |
| 228 |
example.) All require that you first sync your local repository |
| 229 |
then bring up their graphical interface on your desktop. And |
| 230 |
even with all that, I still cannot see what I typically want to |
| 231 |
see without multiple clicks. Checking on project status from |
| 232 |
a phone while away from the office is not an option. |
| 233 |
|
| 234 |
</p><h2 id="git_makes_it_difficult_to_find_successors_descendants_of_a_check_in"><span>2.2. </span>Git makes it difficult to find successors (descendants) |
| 235 |
of a check-in</h2> |
| 236 |
|
| 237 |
<p> |
| 238 |
Git lets you look backwards in time, but not forwards. |
| 239 |
Given some historical check-in, you can see what came before, |
| 240 |
but it is challenging to see what came next. |
| 241 |
|
| 242 |
</p><p> |
| 243 |
In contrast, Fossil offers helpful displays that move |
| 244 |
forward in time. Here are a few examples: |
| 245 |
|
| 246 |
</p><ul> |
| 247 |
<li><p> |
| 248 |
<a href="https://sqlite.org/src/timeline?df=major-release"> |
| 249 |
All SQLite check-ins derived from the most recent major release</a> |
| 250 |
</p></li><li><p> |
| 251 |
<a href="https://sqlite.org/src/timeline?d=major-release&p=trunk"> |
| 252 |
All check-ins derived from the most recent major release that contribute |
| 253 |
to the tip of the trunk branch</a> |
| 254 |
</p></li><li><p> |
| 255 |
<a href="https://sqlite.org/src/timeline?d=version-3.48.0&p=version-3.49.0"> |
| 256 |
All check-ins that are both descendants of version 3.48.0 and |
| 257 |
ancestors of version 3.49.0.</a> |
| 258 |
</p></li><li><p> |
| 259 |
<a href="https://sqlite.org/src/timeline?from=2025-02-03T13:20Z&ft=major-release"> |
| 260 |
Show the direct path from the bug fix checked in at 2025-02-03T13:20Z forward |
| 261 |
to the next major release</a>. |
| 262 |
</p></li><li><p> |
| 263 |
<a href="https://sqlite.org/src/timeline?from=2025-02-03T13:20Z&ft=major-release&min"> |
| 264 |
Abbreviated form of the previous</a>. |
| 265 |
</p></li></ul> |
| 266 |
|
| 267 |
<p>It is not impossible to find the descendants of a check-in |
| 268 |
in Git. It is merely difficult. For example, |
| 269 |
there is a |
| 270 |
<a href="https://stackoverflow.com/questions/27960605/find-all-the-direct-descendants-of-a-given-commit#27962018">stackoverflow page</a> |
| 271 |
showing the command sequence for finding the descendants of a check-in |
| 272 |
in unix: |
| 273 |
|
| 274 |
</p><div class="codeblock"><pre>git rev-list --all --parents | grep ".\{40\}.*<parent_sha1>.*" | awk '{print $1}' |
| 275 |
</parent_sha1> |
| 276 |
</pre></div> |
| 277 |
|
| 278 |
<p> |
| 279 |
But this is not the same thing. The command above gives |
| 280 |
a list of descendants without showing the branching structure, which |
| 281 |
is important for understanding what happened. And the command only works |
| 282 |
if you have a local clone of the repository; finding the descendants of |
| 283 |
a check-in is not something you can do with web interfaces such |
| 284 |
as GitHub or GitLab. |
| 285 |
|
| 286 |
</p><p> |
| 287 |
This is not really about just finding the descendants of a check-in |
| 288 |
from time to time. The fact that descendants are readily available in |
| 289 |
Fossil means that the information pervades the web pages provided by |
| 290 |
Fossil. One example: Every Fossil check-in information page |
| 291 |
(<a href="https://sqlite.org/src/info/ec7addc87f97bcff">example</a>) shows |
| 292 |
a small "Context" graph of the immediate predecessor and successors |
| 293 |
to that check-in. This helps the user maintain better situational |
| 294 |
awareness, and it provides useful capabilities, such as the ability |
| 295 |
to click forward to the next check-in within a sequence. Another example: |
| 296 |
Fossil easily shows the context around a specific check-in |
| 297 |
(<a href="https://sqlite.org/src/timeline?c=2018-03-16&n=10">example</a>) |
| 298 |
which again helps to promote situational awareness and a deeper |
| 299 |
understanding of what is happening in the code. There is a |
| 300 |
<a href="https://fossil-scm.org/fossil/doc/trunk/www/webpage-ex.md">whole page of additional examples</a> |
| 301 |
in the <a href="https://fossil-scm.org/fossil">Fossil documentation</a>. |
| 302 |
|
| 303 |
</p><p> |
| 304 |
All of the above is theoretically possible with Git, given the right extensions |
| 305 |
and tools and using the right commands. But it is not easy to do, |
| 306 |
and so it rarely gets done. Consequently, developers have less awareness |
| 307 |
of what is happening in the code. |
| 308 |
|
| 309 |
</p><h2 id="the_mental_model_for_git_is_needlessly_complex"><span>2.3. </span>The mental model for Git is needlessly complex</h2> |
| 310 |
|
| 311 |
<p> |
| 312 |
The complexity of Git |
| 313 |
distracts attention from the software under development. A user of Git |
| 314 |
needs to keep all of the following in mind: |
| 315 |
</p><ol type="a"> |
| 316 |
<li> The working directory |
| 317 |
</li><li> The "index" or staging area |
| 318 |
</li><li> The local head |
| 319 |
</li><li> The local copy of the remote head |
| 320 |
</li><li> The actual remote head |
| 321 |
</li></ol> |
| 322 |
<p> |
| 323 |
Git has commands (and/or options on commands) for moving and |
| 324 |
comparing content between all of these locations. |
| 325 |
|
| 326 |
</p><p>In contrast, |
| 327 |
Fossil users only need to think about their working directory and |
| 328 |
the check-in they are working on. That is 60% less distraction. |
| 329 |
Every developer has a finite number of brain-cycles. Fossil |
| 330 |
requires fewer brain-cycles to operate, thus freeing up |
| 331 |
intellectual resources to focus on the software under development. |
| 332 |
|
| 333 |
</p><p>One user of both Git and Fossil |
| 334 |
<a href="https://news.ycombinator.com/item?id=16806955">writes in HN</a>: |
| 335 |
|
| 336 |
</p><blockquote><i> |
| 337 |
Fossil gives me peace of mind that I have everything ... synced to |
| 338 |
the server with a single command.... |
| 339 |
I never get this peace of mind with git. |
| 340 |
</i></blockquote> |
| 341 |
|
| 342 |
<h2 id="git_does_not_track_historical_branch_names"><span>2.4. </span>Git does not track historical branch names</h2> |
| 343 |
|
| 344 |
<p> |
| 345 |
Git keeps the complete DAG of the check-in sequence. But branch |
| 346 |
tags are local information that is not synced and not retained |
| 347 |
once a branch closes. |
| 348 |
This makes review of historical |
| 349 |
branches tedious. |
| 350 |
|
| 351 |
</p><p> |
| 352 |
As an example, suppose a customer asks you: |
| 353 |
"What ever became of that 'prefer-coroutine-sort-subquery' branch |
| 354 |
from two years ago?" |
| 355 |
You might try to answer by consulting the history in |
| 356 |
your version control system, thusly: |
| 357 |
|
| 358 |
</p><ul> |
| 359 |
<li><b>GitHub:</b> <a href="https://github.com/sqlite/sqlite/commits/prefer-coroutine-sort-subquery">https://github.com/sqlite/sqlite/commits/prefer-coroutine-sort-subquery</a> |
| 360 |
</li><li><b>Fossil:</b> <a href="https://sqlite.org/src/timeline?r=prefer-coroutine-sort-subquery">https://sqlite.org/src/timeline?r=prefer-coroutine-sort-subquery</a> |
| 361 |
</li></ul> |
| 362 |
|
| 363 |
<p> |
| 364 |
The Fossil view clearly shows that the branch was eventually merged back into |
| 365 |
trunk. It shows where the branch started, and it shows two occasions where changes |
| 366 |
on trunk were merged into the branch. GitHub shows none of this. In fact, the |
| 367 |
GitHub display is mostly useless in trying to figure out what happened. |
| 368 |
|
| 369 |
</p><p> |
| 370 |
Many readers have recommended various third-party GUIs for Git that |
| 371 |
might do a better job of showing historical development activity. Maybe |
| 372 |
some of them do work better than native Git and/or GitHub, though they |
| 373 |
will all be hampered by the fact that Git does not preserve historical |
| 374 |
branch names across syncs. And even if those other tools are better, |
| 375 |
the fact that it is necessary to go to a third-party tool to get the information |
| 376 |
desired does not speak well of the core system. |
| 377 |
|
| 378 |
</p><h2 id="git_requires_more_administrative_support"><span>2.5. </span>Git requires more administrative support</h2> |
| 379 |
|
| 380 |
<p> |
| 381 |
Git is complex software. |
| 382 |
One needs an installer of some kind to put Git on a developer |
| 383 |
workstation, or to upgrade to a newer version of Git. |
| 384 |
Standing up a Git server is non-trivial, and so most developers |
| 385 |
use a third-party service such as GitHub or GitLab, |
| 386 |
and thus introduce additional dependencies. |
| 387 |
|
| 388 |
</p><p> |
| 389 |
In contrast, Fossil is a single standalone binary which is |
| 390 |
installed by putting it on $PATH. That one binary contains all |
| 391 |
the functionality of core Git and also GitHub and/or GitLab. It |
| 392 |
manages a community server with wiki, bug tracking, chat, and forums, |
| 393 |
provides packaged downloads for consumers, login managements, |
| 394 |
and so forth, with no extra software required. Standing up a |
| 395 |
community server for Fossil takes minutes. And Fossil is efficient. |
| 396 |
A Fossil server will run fine on a $5/month VPS or a Raspberry Pi, |
| 397 |
whereas GitLab and similar require beefier hardware. |
| 398 |
|
| 399 |
</p><p> |
| 400 |
Less administration means that programmers spend more time working |
| 401 |
on the software (SQLite in this case) and less time fussing with |
| 402 |
the version control system. |
| 403 |
|
| 404 |
</p><h2 id="git_provides_a_poor_user_experience"><span>2.6. </span>Git provides a poor user experience</h2> |
| 405 |
|
| 406 |
<p>The following <a href="https://xkcd.com/1597/">https://xkcd.com/1597/</a> cartoon is an |
| 407 |
exaggeration, yet hits close to home: |
| 408 |
|
| 409 |
</p><p> |
| 410 |
<img src="https://www.fossil-scm.org/fossil/doc/trunk/www/xkcd-git.gif"> |
| 411 |
|
| 412 |
</p><p>Let's be real. Few people dispute that Git provides |
| 413 |
a suboptimal user experience. A lot of |
| 414 |
the underlying implementation shows through into the user |
| 415 |
interface. The interface is so bad that there is even a |
| 416 |
parody site that generates |
| 417 |
<a href="https://git-man-page-generator.lokaltog.net/">fake git man pages</a>. |
| 418 |
|
| 419 |
</p><p>Designing software is hard. It takes a lot of focus. |
| 420 |
A good version control system should provide the developer with |
| 421 |
assistance, not frustration. Git has gotten better in this |
| 422 |
regard over the past decade, but it still has a long way to go. |
| 423 |
|
| 424 |
<a name="getthecode"></a> |
| 425 |
</p><h1 id="a_git_user_s_guide_to_accessing_sqlite_source_code"><span>3. </span>A Git-User's Guide To Accessing SQLite Source Code</h1> |
| 426 |
|
| 427 |
<p> |
| 428 |
If you are a devoted Git user, you can still easily access SQLite. |
| 429 |
This section gives some hints on how to do so. |
| 430 |
|
| 431 |
</p><h2 id="the_official_github_mirror"><span>3.1. </span>The Official GitHub Mirror</h2> |
| 432 |
|
| 433 |
<p> |
| 434 |
As of 2019-03-20, there is now an |
| 435 |
<a href="https://github.com/sqlite/sqlite">official Git mirror</a> of the |
| 436 |
SQLite sources on GitHub. |
| 437 |
|
| 438 |
</p><p>The mirror is an incremental export of the |
| 439 |
<a href="https://sqlite.org/src/timeline">canonical Fossil repository</a> for |
| 440 |
SQLite. A cron-job updates the GitHub repository once an hour. |
| 441 |
This is a one-way, read-only code mirror. No pull requests or |
| 442 |
changes are accepted via GitHub. The GitHub repository merely copies |
| 443 |
the content from the Fossil repository. All changes are input via |
| 444 |
Fossil. |
| 445 |
|
| 446 |
</p><p> |
| 447 |
The hashes that identify check-ins and files on the Git mirror are |
| 448 |
different from the hashes in Fossil. There are many reasons for |
| 449 |
this, chief among them that Fossil uses a SHA3-256 hash whereas |
| 450 |
Git uses a SHA1 hash. During export, the original Fossil hash for |
| 451 |
each check-in is added as a footer to check-in comments. To avoid |
| 452 |
confusion, always use the original Fossil hash, not the Git hash, |
| 453 |
when referring to SQLite check-ins. |
| 454 |
|
| 455 |
</p><h2 id="web_access"><span>3.2. </span>Web Access</h2> |
| 456 |
|
| 457 |
<p> |
| 458 |
The <a href="https://sqlite.org/src/timeline">SQLite Fossil Repository</a> contains links |
| 459 |
for downloading a Tarball, ZIP Archive, or <a href="sqlar.html">SQLite Archive</a> for any |
| 460 |
historical version of SQLite. The URLs for these downloads are |
| 461 |
simple and can be incorporated easily into automated tools. The format is: |
| 462 |
|
| 463 |
</p><blockquote> |
| 464 |
<tt>https://sqlite.org/src/tarball/</tt><i>VERSION</i><tt>/sqlite.tar.gz</tt> |
| 465 |
</blockquote> |
| 466 |
|
| 467 |
<p> |
| 468 |
Simply replace <i>VERSION</i> with some description of the version to be |
| 469 |
downloaded. The <i>VERSION</i> can be a prefix of the cryptographic hash |
| 470 |
name of a specific check-in, or the name of a branch (in which case the |
| 471 |
most recent version of the branch is fetched) or a tag for a specific |
| 472 |
check-in like "version-3.23.1": |
| 473 |
|
| 474 |
</p><blockquote> |
| 475 |
<tt>https://sqlite.org/src/tarball/version-3.23.1/sqlite.tar.gz</tt> |
| 476 |
</blockquote> |
| 477 |
|
| 478 |
|
| 479 |
<p>To get the latest release, use "release" |
| 480 |
for <i>VERSION</i>, like this: |
| 481 |
|
| 482 |
</p><blockquote> |
| 483 |
<tt>https://sqlite.org/src/tarball/release/sqlite.tar.gz</tt> |
| 484 |
</blockquote> |
| 485 |
|
| 486 |
<p> |
| 487 |
To get the latest trunk check-in, us "trunk" for <i>VERSION</i>: |
| 488 |
|
| 489 |
</p><blockquote> |
| 490 |
<tt>https://sqlite.org/src/tarball/trunk/sqlite.tar.gz</tt> |
| 491 |
</blockquote> |
| 492 |
|
| 493 |
<p> |
| 494 |
And so forth. |
| 495 |
For ZIP archives and SQLite Archives, simply change the "/tarball/" element |
| 496 |
into either "/zip/" or "/sqlar/", and maybe also change the name of the |
| 497 |
download file to have a ".zip" or ".sqlar" suffix. |
| 498 |
|
| 499 |
</p><h2 id="fossil_access"><span>3.3. </span>Fossil Access</h2> |
| 500 |
|
| 501 |
<p> |
| 502 |
Fossil is easy to install and use. Here are the steps for unix. |
| 503 |
(Windows is similar.) |
| 504 |
|
| 505 |
</p><ol> |
| 506 |
<li> |
| 507 |
Download the self-contained Fossil executable from |
| 508 |
<a href="https://fossil-scm.org/fossil/uv/download.html">https://fossil-scm.org/fossil/uv/download.html</a> and put the executable |
| 509 |
somewhere on your $PATH. |
| 510 |
</li><li><tt>mkdir ~/fossils</tt> |
| 511 |
</li><li><tt>fossil clone https://sqlite.org/src ~/fossils/sqlite.fossil</tt> |
| 512 |
</li><li><tt>mkdir ~/sqlite; cd ~/sqlite</tt> |
| 513 |
</li><li><tt>fossil open ~/fossils/sqlite.fossil</tt> |
| 514 |
</li></ol> |
| 515 |
|
| 516 |
<p> |
| 517 |
At this point you are ready to type "<tt>./configure; make</tt>" |
| 518 |
(or on Windows with MSVC, "<tt>nmake /f Makefile.msc</tt>"). |
| 519 |
|
| 520 |
</p><p> |
| 521 |
To change your checkout to a different version of Fossil use |
| 522 |
the "update" command: |
| 523 |
|
| 524 |
</p><blockquote> |
| 525 |
<tt>fossil update </tt><i>VERSION</i> |
| 526 |
</blockquote> |
| 527 |
|
| 528 |
<p> |
| 529 |
Use "trunk" for <i>VERSION</i> to get the latest trunk version of SQLite. |
| 530 |
Or use a prefix of a cryptographic hash name, or the name of some branch |
| 531 |
or tag. See |
| 532 |
<a href="https://fossil-scm.org/fossil/doc/trunk/www/checkin_names.wiki">https://fossil-scm.org/fossil/doc/trunk/www/checkin_names.wiki</a> for more |
| 533 |
suggestions on what names can be used for <i>VERSION</i>. |
| 534 |
|
| 535 |
</p><p> |
| 536 |
Use the "<tt>fossil ui</tt>" command from within the ~/sqlite checkout to |
| 537 |
bring up a local copy of the website. |
| 538 |
|
| 539 |
</p><p> |
| 540 |
Additional documentation on Fossil can be found at |
| 541 |
<a href="https://fossil-scm.org/fossil/doc/trunk/www/permutedindex.html">https://fossil-scm.org/fossil/doc/trunk/www/permutedindex.html</a> |
| 542 |
|
| 543 |
</p><p> |
| 544 |
Do not be afraid to explore and experiment. |
| 545 |
Without a log-in you won't be able to |
| 546 |
push back any changes you make, so you cannot damage the project. |
| 547 |
|
| 548 |
</p><h2 id="verifying_source_code_integrity"><span>3.4. </span>Verifying Source Code Integrity</h2> |
| 549 |
|
| 550 |
<p> |
| 551 |
If you need to verify that the SQLite source code that you have is |
| 552 |
authentic and has not been modified in any way (perhaps by an adversary) |
| 553 |
that can be done using a few simple command-line tools. At the root |
| 554 |
of the SQLite source tree is a file named "manifest". The manifest |
| 555 |
file contains the name of every other file in the source tree together |
| 556 |
with either a SHA1 or SHA3-256 hash for that file. (SHA1 is used for |
| 557 |
older files and SHA3-256 for newer files.) You can write a |
| 558 |
script to extract these hashes and verify them against the source code |
| 559 |
files. The hash name for the check-in is just the SHA3-256 hash of the |
| 560 |
"manifest" file itself, possibly with the last line omitted if the |
| 561 |
last line begins with "# Remove this line..." |
| 562 |
|
| 563 |
</p><h1 id="see_also"><span>4. </span>See Also</h1> |
| 564 |
|
| 565 |
<p>Other pages that talk about Fossil and Git include: |
| 566 |
</p><ul> |
| 567 |
<li><p><a href="https://fossil-scm.org/fossil/doc/trunk/www/fossil-v-git.wiki">Fossil vs. Git</a> |
| 568 |
</p></li><li><p><a href="https://www.fossil-scm.org/fossil/doc/trunk/www/quotes.wiki">What others say about Fossil and Git</a> |
| 569 |
</p></li></ul> |
| 570 |
<p align="center"><small><i>This page was last updated on 2025-11-13 07:12:58Z </small></i></p> |
| 571 |
|