News for hackers. Stuff that matters.
Re:Gitqlite: Query Git Repositories with SQL by dan-robertson on Saturday July 04, 2020 @05:19PM (#23734987)
See also: Fossil, a version control system backed by a SQLite database. The author (of Fossil and SQLite) points out that a real database gives you more flexible efficient queries for your data. In git in comparison, it is for example much easier to find the parents of a commit than its children.
Re:Gitqlite: Query Git Repositories with SQL by move-on-by on Sunday July 05, 2020 @12:30AM (#23736597)
I used fossil professionally for about a year before company got bought out and switched to git. It was interesting. It’s been a few years since then, but here are my thoughts:

* the built-in web server was neat and useful

* when things got in a weird state (anyone learning Git knows what I mean)- it was extremely difficult to find a solution. Doing a web search was a waste of time, no one is sharing their useful Fossil SCM knowledge online.

* clear text passwords. To clarify this a bit, users are local to the clone, so not like it’s being shared... but then again clear text passwords. I just looked it up again, looks like it’s SHA1 now..... bcrypt would be nice.

* Fossil SCM does not believe in altering history. Your not going to find any squash commits or branch rebases. There is a ‘shun’ command for removing sensitive information, but it’s specifically designed to not work like git history edits and has weird behavior regarding clones.

Overall, I significantly prefer git. Being able to find solutions if something goes wrong is huge. Not having to train people on another tool when they join the team is good- you can put git as a skill requirement without limiting your options, you can’t do that with Fossil SCM. I learned Git first, so very likely I’m bias on the git-way vs. the fossil way. It was an interesting experience. To have a version control system have a built-in web server, it’s certainly unique!

Re:Gitqlite: Query Git Repositories with SQL by microcolonel on Saturday July 04, 2020 @06:54PM (#23735463)
> In git in comparison, it is for example much easier to find the parents of a commit than its children.

Sure, but both are really cheap.

Re:Gitqlite: Query Git Repositories with SQL by cryptonector on Saturday July 04, 2020 @07:01PM (#23735498)
Well, no, in huge repositories with lots of branches it's not. But this is true for Fossil as well. IIRC MSFT did a study with the Windows repository showing that a relational approach to VCS bloated the repository too much, and out of this grew the Bloom filter approach to speeding up with git blame/log.
Re:Gitqlite: Query Git Repositories with SQL by balfirevic on Saturday July 04, 2020 @07:50PM (#23735697)
> But this is true for Fossil as well.

Since I don't know anything about how Fossil stores commit metadata this might a naive question - but why is that?

I would guess that being able to efficiently query all the children of particular commit should be just an index away.

Re:Gitqlite: Query Git Repositories with SQL by microcolonel on Saturday July 04, 2020 @07:55PM (#23735717)
> I would guess that being able to efficiently query all the children of particular commit should be just an index away.

Yes, but where will you find the space, and when will you compute it?

Re:Gitqlite: Query Git Repositories with SQL by balfirevic on Saturday July 04, 2020 @09:40PM (#23736069)
I'm not sure I understand what you mean. I was talking about Fossil, which uses SQLite under the hood, which would then maintain the index whenever data in it is modified.
Re:Gitqlite: Query Git Repositories with SQL by cryptonector on Sunday July 05, 2020 @01:42AM (#23736854)
Scale. Microsoft couldn't make a SQL VCS work. Maybe it's because they tried to use SQL Server instead of PostgreSQL, I dunno :) but IIRC the amounts of metadata involved essentially meant that they had no hope of doing git-like cloning: it was too much to clone.
Re:Gitqlite: Query Git Repositories with SQL by sitkack on Tuesday July 14, 2020 @02:27AM (#23829131)
You would need to implement a persistent datastructure, but without refcounts, you would have to do a gc. I guess you could do a refcount tree and only RC at the last common node.

Really atime is the devil. Funny thing is, is that all modern higher level systems have some form of data access logging, which is what you want anyway. So why not form some easily compressible event log?