3 ms·
I was tinkering with writing my own .git parser recently, and I couldn't help thinking "this could've been an sqlite db". I found https://github.com/chrislloyd
by Retr0id 10mo ago
I was tinkering with writing my own .git parser recently, and I couldn't help thinking "this could've been an sqlite db".
I found https://github.com/chrislloyd/git-remote-sqlite https://github.com/chrislloyd/git-remote-sqlite as a way to achieve git-on-sqlite, which works by registering itself as a git "remote" helper.
Amusingly there exists a "Why SQLite Does Not Use Git" article (https://sqlite.org/whynotgit.html https://sqlite.org/whynotgit.html), but there is no corresponding "Why Git Does Not Use SQLite".
- conartist6 10mo agoWell the big difference is that an sqlite db has to be running. Git repos just exist as long as the files are on disk, which I think is a mental model people are very used to by now.
- Retr0id 10mo agoNo, the whole magic of sqlite is that it is also just file-on-disk.
- conartist6 10mo agoHuh I didn't know that. Thanks for the correction.
- _flux 10mo agoSqlite does not have a server component (although there may be other projects that do provide sqlite as a server). Sqlite files are also just files on the disk.
- misnome 10mo ago> "Why Git Does Not Use SQLite" For one, you probably don't want your git repo permanently corrupted if you happen to be running it over an NFS mount. There is a lot of value in "scattered write-once files" as a storage mechanism.
- debugnik 10mo ago> this could've been an sqlite db And yet Fossil doesn't use SQLite for its own data model, just as a blob store with indices. "Fossil is not Relational": https://fossil-scm.org/home/doc/trunk/www/fossil-is-not-relational.md https://fossil-scm.org/home/doc/trunk/www/fossil-is-not-rela...