News for hackers. Stuff that matters.
Re:Why SQLite Does Not Use Git by neals on Tuesday April 10, 2018 @06:39PM (#16806234)
I'm a big fan of Fossil myself. But the SQlite people have something that I don't really have within the teams I operate : the authority to dare and speak out against Git and not be laughed away like a hipster that is just trying to be different.
Re:Why SQLite Does Not Use Git by cies on Tuesday April 10, 2018 @07:15PM (#16806520)
Hipster source code management? See this Rust project:

https://pijul.org

https://pijul.org/manual/why_pijul.html

A bit like DARCS (also very hipster, in Haskell and has some math behind it), but then fast.

https://pijul.org/model/#efficient-algorithms

https://pijul.org/faq/

Oh and it uses a cool hi-perf storage lib (also in Rust, by the same devs):

https://nest.pijul.com/pijul_org/sanakirja

Re:Why SQLite Does Not Use Git by hinkley on Tuesday April 10, 2018 @09:06PM (#16807202)

    Pijul lets you describe your edits after you’ve made them, instead of beforehand.
Pardon my French, but about fuckin time.

On a big product, forensics matter. Not day to day, but often enough and if your metadata is rotten then you’re left with the oral history of the project as your only guide. And even that may not exist, depending on project structure.

Re:Why SQLite Does Not Use Git by pyre on Tuesday April 10, 2018 @10:32PM (#16807588)
Git has something similar called git-notes, but at the time I tried using it, it was really early-days. No idea how support is working for that now. You could also make an annotated tag, which has it's own "commit message", but it will show up with all other tags.

[1] https://git-scm.com/docs/git-notes

Re:Why SQLite Does Not Use Git by hinkley on Wednesday April 11, 2018 @12:46PM (#16812966)
Git notes is interesting but it’s a manual process.

When selecting technology I look for “a rising tide lifts all boats” situations and opt-in tools have limitations in that regard.

There’s a big gap between ‘can do’ and ‘will do’ and I feel like we downplay that frequently in our industry, and to our own peril.

Re:Why SQLite Does Not Use Git by Izkata on Wednesday April 11, 2018 @06:32PM (#16816355)
Standalone, that sounds like a commit message - which you make after editing the code anyway. (And possibly tweak/update with git rebase before pushing)

In that section's context, it sounds like naming a branch after having already started on it. In which case, that seems to me the tiniest bit less useful than git's ability to rename branches (git branch -m oldname newname).

What am I missing?

Re:Why SQLite Does Not Use Git by peatmoss on Tuesday April 10, 2018 @07:24PM (#16806605)
Darcs was also prior art (certainly the first DVCS I ever encountered), which makes me more inclined to call them innovative than hipster :-)
Re:Why SQLite Does Not Use Git by cies on Tuesday April 10, 2018 @07:37PM (#16806695)
That would make Haskell innovative instead of hipster as well.. :)
Re:Why SQLite Does Not Use Git by peatmoss on Tuesday April 10, 2018 @07:46PM (#16806773)
Woah woah woah, let’s not get ahead of ourselves! :-)
Re:Why SQLite Does Not Use Git by atombender on Tuesday April 10, 2018 @11:31PM (#16807818)
I haven't used Pijul, but I did use Darcs for several large production projects back when it was still a thing.

Darcs was magical -- in both senses of the word. It was incredible to see it figure out which patches depended on which, allowing a fluid exchange of changes between branches in a way that quickly becomes a nightmare in git. But it was also magical in that nobody really understood the internals. Not in the sense of git where the underlying data model is pretty simple, and the "version control" aspect is a (thin!) UX veneer on top, but in the sense that it was like quantum physics. When something went wrong, it was almost always impossible to fix. And with Darcs, things did go wrong, because it had bugs, specifically a certain dreaded "exponential conflict" edge case where, if it encountered an identical line change in two patches from different branches (or something like that, it's been more than 10 years), computation time went through the roof and the merge command almost never finished. At several points we had to start history from scratch to avoid spending an entire day fighting the conflict problem. Another thing with Darcs (and presumably Pijul) was that since it tracks patch inter-dependencies, you can rarely cherry-pick individual patches -- pulling out one patch tends to pull with it a whole string of related patches, all connected. Which is often what you want (git just fails horribly in such cases), but sometimes you do want to "forcibly cherry-pick" and manually fix, change identity be damned. I don't know if Pijul supports this.

It looks like Pijul fixes the conflict problem, but it still seems to keep the "quantum theory of patches" that requires an above-average developer to understand. If it has no bugs, then maybe the problem is moot, but in our industry, transparent, "self-repairable" tech seems to win in the long run over the esoteric, opaque and magical.

That said, it's clear the Darcs/Pijul has a vastly better UX, which I'm all for. Git's data model works remarkably well for what it does, but it's always been obvious to me that its "record snapshots and try to make sense of them after the fact" philosophy is a bit flawed. The article mentions branch history. And rename detection doesn't work well with how most people work, for example; it's a clever kind of lazy evaluation, but probably designed for Linux kernel devs, so not clever enough. Darcs had a patch type specifically for renames, and it worked very well.

Another thing I wish version control systems had was what you might call a high-level changelog. It would let you group and annotate commits after the fact, but without changing them. For example, you might want to group a bunch of patches as a single "feature" commit. Then you could make a "release" group that groups a bunch of feature commits. In other words, several levels of nesting, with each commit containing child commits and so on. Viewing the log should show only the highest-level groups, with the option to expand them visually so you can see what they contain. You should be able to group things like this after the fact without changing commit order, and you should be able to annotate the log (e.g. add more information to a commit message) without mutating the underlying patches. Git was on the verge of ventured into this territory with its (now discouraged) "merge commits" -- a high-level commit that represents a single logical merge but encapsulates multiple physical patches -- but that didn't go anywhere. The nice thing about a high-level history like this is that you could use it to drive release notes and change logs, and it would greatly aid in project management and issue tracking, because you could manage entire sets of commits by what issues or pull requests or milestones or whatever they relate to.

Re:Why SQLite Does Not Use Git by WorldMaker on Wednesday April 11, 2018 @12:17PM (#16812636)
> It looks like Pijul fixes the conflict problem, but it still seems to keep the "quantum theory of patches" that requires an above-average developer to understand. If it has no bugs, then maybe the problem is moot, but in our industry, transparent, "self-repairable" tech seems to win in the long run over the esoteric, opaque and magical.

The patch theory is complex, but it isn't that complex. Especially since there is plenty of alternate implementations out there of Operational Transforms (OTs) and Conflict Free Replicated Data Types (CRDTs), it's relatives/cousins/descendants. In theory, any developer than can grok a blockchain or a Redis cache should be able to grok the patch theory.

Darcs suffered much more from being written in Haskell, I think, than from the actual complexity of its patch theory.

Pijul being written primarily in Rust maybe has a chance of also getting over that hump a bit easier than Darcs had. Though now it also has the uphill climb of competing against git's inertia.

> Git was on the verge of ventured into this territory with its (now discouraged) "merge commits"

Discouraged only by people that don't know `--first-parent` exists as a useful `git log` and other command arguments. The useful thing about a DAG is you can very easily slice it to create arbitrary "straight line" views. You don't have to constantly smash and squash history to artificially force your DAG into a straight line.

Re:Why SQLite Does Not Use Git by sjellis on Wednesday April 11, 2018 @03:44AM (#16808895)
"....in our industry, transparent, "self-repairable" tech seems to win in the long run over the esoteric, opaque and magical."

Quoted for truth.

Re:Why SQLite Does Not Use Git by FridgeSeal on Tuesday April 10, 2018 @09:24PM (#16807280)
This is super, super cool - thanks for sharing!
Re:Why SQLite Does Not Use Git by cies on Wednesday April 11, 2018 @02:54AM (#16808679)
Most welcome. It's one of those projects that I keep half an eye on because it is just waaay too fantastic while not being unfeasible.
Re:Why SQLite Does Not Use Git by matt_wulfeck on Tuesday April 10, 2018 @06:45PM (#16806294)
Git is a use-case that is excellent for 90% of development. Sqlite is just an example where the use-case isn't necessarily ideal, not an indicator that it's "better" than git.
Re:Why SQLite Does Not Use Git by bch on Tuesday April 10, 2018 @07:05PM (#16806450)
I’m a fossil fan.

I’d say that git is fine for 90% of development (or some arbitrarily large number), but so is fossil. I don’t even think that SQLite-in-git would necessarily be a deal-breaker that couldn’t be worked around (drh ‘sqlite can chime in here). The whole space (from personal projects to global collaboration) is diverse enough that there’s no talking about “better” without qualifying the situation, either.

Fossil is good for a large subset of work that can benefit from source control management, regardless of git.

What git definately has is

1) scaleabilty, which is probably of no consequence for 99% of the cases it is employed

2) network effect, for better AND worse

Re:Why SQLite Does Not Use Git by nebulous1 on Tuesday April 10, 2018 @07:45PM (#16806763)
> drh ‘sqlite can chime in here

He already has

> With Git, it is very difficult to find the successors (decendents) of a check-in ... This is a deal-breaker, a show-stopper.

Re:Why SQLite Does Not Use Git by AstralStorm on Wednesday April 11, 2018 @05:44AM (#16809478)
Someone still thinks in the single main branch mode. It is sometimes the main case but definitely not in git world.

This operation is not easy in any DAG. It involves:

- find all or desired branch tips - walk backwards until hitting tge desired checkin - memoize already seen parents to not walk them multiple times

Re:Why SQLite Does Not Use Git by bzbarsky on Wednesday April 11, 2018 @01:01AM (#16808190)
Amusingly enough, git's scaleability is also not that great (e.g. worse than mercurial last I checked).

The network effects are there, though.

Re:Why SQLite Does Not Use Git by AstralStorm on Wednesday April 11, 2018 @05:44AM (#16809480)
Please provide the source about scalability. Also what kind of scalability?
Re:Why SQLite Does Not Use Git by bzbarsky on Wednesday April 11, 2018 @09:49AM (#16811015)
Scalability to large numbers of files and large numbers of changesets.

For the large number of files one https://code.facebook.com/posts/218678814984400/scaling-merc... is one source. There's some earlier discussion of the same issue at https://news.ycombinator.com/item?id=3549679 that goes into some technical details.

There has been some work on git since then to address some of those issues (e.g. see https://blogs.msdn.microsoft.com/bharry/2017/02/03/scaling-g... ) but it's not clear to me that it helped enough to catch up to where Mercurial is for large repos.

For large numbers of changesets, just try running "log" or "annnotate" on any file with a long history in git. I just did this simple experiment:

1) hg clone https://hg.mozilla.org/mozilla-central/

2) git clone https://github.com/mozilla/gecko-dev.git

3) (cd mozilla-central && time hg log dom/base/nsDocument.cpp)

4) (cd gecko-dev && time git log dom/base/nsDocument.cpp)

It's not quite apples to apples because the git repo there has some pre-mercurial CVS history in it. But note that I'm not even using --follow for git and the file _has_ been renamed after the mercurial repo starts, so git is actually finding fewer commits than mercurial is here.

Anyway, if I do the above log calls a few times to make sure the caches are warm, I end up seeing times in the 8s range for git and the 0.8s range (yes, 10x faster) for mercurial.

That all said, most repos do not have millions (or even hundreds of thousands) of changesets or files. So the scalability problems are not problems for most users of either VCS.

Re:Why SQLite Does Not Use Git by pmarreck on Wednesday April 11, 2018 @01:15AM (#16808248)
I have never once had to use the missing feature that was a dealbreaker for the SQLite guys (find the descendants of an arbitrary commit). I have no idea what they're doing if they super depend on something like that.
Re:Why SQLite Does Not Use Git by tetha on Tuesday April 10, 2018 @06:48PM (#16806320)
What the hell, speaking against git makes you a hipster now? I was called a hipster for proposing git over CSV and SVC.
Re:Why SQLite Does Not Use Git by ben509 on Tuesday April 10, 2018 @08:41PM (#16807073)
If you were promoting git back in the days of SVN and are now moving on to something else because git is too popular, just cop to it, you're a hipster. :-P
Re:Why SQLite Does Not Use Git by adamcw on Tuesday April 10, 2018 @07:04PM (#16806438)
As I'm not familiar with those, I have to ask: did you mean CVS and SVN?
Re:Why SQLite Does Not Use Git by tetha on Tuesday April 10, 2018 @07:11PM (#16806497)
Ack. I'm damn sorry, I just had a fully botched prod-update from hell and I'm on tilt.

Yes. CVS and SVN. The old and ugly ones.

Re:Why SQLite Does Not Use Git by hermitdev on Tuesday April 10, 2018 @08:06PM (#16806895)
You want old, ugly, slow, pain-in-the-ass and proprietary,? Try ClearCase. Expensive. Drain on productivity (all commits were individual file based, meaning it was extraordinarily easy to miss a change; also had no concept of an ignore, so really easy to miss adding a new file). Also, very. fucking. slow. A moderately sized project (or VOB in clearcase terminology) could take an hour to update. I've probably lost a year of my life waiting for clearcase to complete. Also, it had a habit of just royally fucking up even trivial merges (dropping braces in C++ code, for example, or ignoring whitespace changes in python code for another).
Re:Why SQLite Does Not Use Git by lokedhs on Tuesday April 10, 2018 @09:33PM (#16807314)
I've never used Clearcase, but I worked for Sun around 2000 and one of the things I did was analysing kernel dumps of Solaris.

If we saw the Clearcase kernel module you can be sure that that was going to be the root cause of the crash. That thing seemed to really terrible, and it wouldn't surprise me if the rest of the product was as bad.

I don't know if things have changed now, but to use Clearcase you needed a kernel module that provided a special filesystem that you did your work against.

Re:Why SQLite Does Not Use Git by andrewflnr on Tuesday April 10, 2018 @10:40PM (#16807616)
> to use Clearcase you needed a kernel module that provided a special filesystem that you did your work against.

That... Augh, that's actually kind of a good idea, even if it was before its time. But FFS...

Re:Why SQLite Does Not Use Git by lokedhs on Tuesday April 10, 2018 @10:51PM (#16807659)
The idea is not terrible, but when the kernel module is so unstable it brings down the build machines with a kernel panic, I'd say the execution was somewhat lacking.
Re:Why SQLite Does Not Use Git by trentnelson on Wednesday April 11, 2018 @09:35AM (#16810905)
Re:Why SQLite Does Not Use Git by gumby on Tuesday April 10, 2018 @10:23PM (#16807545)
> CVS and SVN. The old and ugly ones.

In their respective times they were a big improvement. I believe CVS was the first client/server revision control system (why that feature was added was a horror story)

Re:Why SQLite Does Not Use Git by ams6110 on Wednesday April 11, 2018 @01:16AM (#16808256)
Never had a problem with SVN personally either. OpenBSD still uses CVS, for an entire operating system.

Which version control you use matters a lot less than having a sane development process.

Re:Why SQLite Does Not Use Git by stevekemp on Wednesday April 11, 2018 @01:57AM (#16808415)
Very much so. I remember jumping from RCS to CVS and it was a very positive change.

(RCS only worked on single files, moving to CVS allowed you to maintain a tree. Before RCS I was using SCCS!)

Re:Why SQLite Does Not Use Git by adamcw on Tuesday April 10, 2018 @07:20PM (#16806572)
Hahah. Nothing to be sorry for, I was just curious. There are enough source systems out there, I wouldn't be surprised if they were a few I hadn't heard of.
Re:Why SQLite Does Not Use Git by dunham on Tuesday April 10, 2018 @10:51PM (#16807658)
See also RCS - the revision control system you discover when you mistype vi. (This frequently happened to people at school back in the SunOS/Solaris days.)
Re:Why SQLite Does Not Use Git by notyourwork on Tuesday April 10, 2018 @07:07PM (#16806462)
10 years ago?
Re:Why SQLite Does Not Use Git by JauntyHatAngle on Tuesday April 10, 2018 @08:39PM (#16807067)
I worked at a pretty well regarded and reputable organisation that still used SVN. (Pretty sure they still do).

If not for my yammering there wouldn't be any git in use by any team there. (Only a year ago)

All the code progressed fine. git would still have improved it but nobody had bothered to switch yet.

Re:Why SQLite Does Not Use Git by sixothree on Tuesday April 10, 2018 @10:58PM (#16807690)
We still use SVN (but tfs git for greenfield projects). We are a small company and only 2 or 3 devs work on the same project at a time. Git itself doesn't solve any problems we have. We still deal with merges when someone goes nuts refactoring.
Re:Why SQLite Does Not Use Git by petre on Wednesday April 11, 2018 @03:06AM (#16808735)
Fossil is a great replacement for that kind of use case. You can fully convert a git or a svn repository with fossil import, so migration is painless. It's also painless for users since fossil is very easy to pick up compared to git and the basic commands are quite similar to svn. Branching and merging is a breeze compared to svn, quite like git but easier. It's also nice for companies that want everything in one place, since all developer repos sync with a central repo by default. It's also distributed in the sense that everything gets replicated to every repo that's in sync with the central repo (it does this automatically at fossil update or fossil sync) contains the full project history.
Re:Why SQLite Does Not Use Git by mb_72 on Tuesday April 10, 2018 @09:36PM (#16807326)
As a mostly solo developer I haven't found a need to switch away from SVN to git or anything else; doing so would involve work I can't bill for and for no benefit to myself or existing clients. Some things in software and life in general are Fine Just As They Are.
Re:Why SQLite Does Not Use Git by dragonshed on Tuesday April 10, 2018 @10:24PM (#16807554)
I also did this until the day came when I wanted to branch and someone showed me how easy it was in git.

I still use SVN from time to time with my old repos, but if given an opening, I migrate it to git without hesitation.

Re:Why SQLite Does Not Use Git by sjellis on Wednesday April 11, 2018 @03:58AM (#16808954)
"I also did this until the day came when I wanted to branch and someone showed me how easy it was in git."

Git is an incredibly powerful tool for managing a set of files over time, but if you just use the handful of basic commands, then I agree that the immediate big win is branching.

Personally, I found that moving from Subversion to Git fundamentally changed my work habits (for the better). I was a lone developer at the time, so the collaboration aspect wasn't really important.

I noticed that Git made it so easy to create a repository that I put everything into version control: not just application code, but random scripts and notes.

The other gain was that I learned to work in small, focused commits, because Git is so fast that commiting often is not a burden. Once I made that change, the commit history became meaningful and useful in a way that that Subversion never was: I could quickly revert code, and look back at individual commits for information.

Re:Why SQLite Does Not Use Git by pdfernhout on Wednesday April 11, 2018 @10:56AM (#16811669)
"The other gain was that I learned to work in small, focused commits"

This!

Re:Why SQLite Does Not Use Git by astura on Wednesday April 11, 2018 @12:47PM (#16812980)
This is surprising?

My company uses SVN. SVN works fine so there isn't really a reason to spend the man hours migrating a crap ton of projects to to Git. Before SVN existed we used CVS and we migrated to SVN from CVS about, idk, 15-ish years ago?

Re:Why SQLite Does Not Use Git by JauntyHatAngle on Wednesday April 11, 2018 @07:39PM (#16816799)
Yes, there are people who are surprised that many have the opinion that SVN is fine for a lot of projects and you don't need to migrate for the sake of it.

That's more or less what I was getting at.

Re:Why SQLite Does Not Use Git by tetha on Tuesday April 10, 2018 @07:13PM (#16806510)
More like 5 - 6 years ago.

So, not recent. But version control is one of the few infrastructural components that's allowed to have decades of churn, in my book. Software lives that long.

Re:Why SQLite Does Not Use Git by bigbadgoose on Tuesday April 10, 2018 @09:12PM (#16807235)
We use zip files distributed and synced by blockchain across BTC and Ether
Re:Why SQLite Does Not Use Git by johnhenry on Tuesday April 10, 2018 @09:15PM (#16807249)
I know this is a joke, but have you checked out mango? https://github.com/axic/mango
Re:Why SQLite Does Not Use Git by bigbadgoose on Tuesday April 10, 2018 @10:14PM (#16807525)
Lol, i mean, it's within the realm of plausibility. My secret sauce is the zipping. The SHA integrity and the zippy bits are decentralized separately and n-matrix distributed across multiple cryptos using a randomized forward time arrow only strategy. so, pretty psicc.
Re:Why SQLite Does Not Use Git by nickpeterson on Tuesday April 10, 2018 @09:34PM (#16807320)
You should probably form a corp.
Re:Why SQLite Does Not Use Git by eddieh on Tuesday April 10, 2018 @09:33PM (#16807313)
I recently tried to speak out against GitFlow...that was a mistake on my team.
Re:Why SQLite Does Not Use Git by pdfernhout on Wednesday April 11, 2018 @11:04AM (#16811782)
See for example: http://endoflineblog.com/gitflow-considered-harmful "I remember reading the original GitFlow article back when it first came out. I was deeply unimpressed - I thought it was a weird, over-engineered solution to a non-existent problem. I couldn't see a single benefit of using such a heavy approach. I quickly dismissed the article and continued to use Git the way I always did (I'll describe that way later in the article). Now, after having some hands-on experience with GitFlow, and based on my observations of others using (or, should I say more precisely, trying to use) it, that initial, intuitive dislike has grown into a well-founded, experienced distaste. In this article I want to explain precisely the reasons for that distaste, and present an alternative way of branching which is superior, at least in my opinion, to GitFlow in every way."

And a summary of an alternative proposed there: http://endoflineblog.com/oneflow-a-git-branching-model-and-w... "As the name suggests, OneFlow's basic premise is to have one eternal branch in your repository. This brings a number of advantages (see below) without losing any expressivity of the branching model - the more advanced use cases are made possible through the usage of Git tags. While the workflow advocates having one long-lived branch, that doesn't mean there aren't other branches involved when using it. On the contrary, the branching model encourages using a variety of support branches (see below for the details). What is important, though, is that they are meant to be short-lived, and their main purpose is to facilitate code sharing and act as a backup. The history is always based on the one infinite lifetime branch."

Re:Why SQLite Does Not Use Git by mythrwy on Tuesday April 10, 2018 @09:35PM (#16807321)
I would have backed you up on that.
Re:Why SQLite Does Not Use Git by e12e on Wednesday April 11, 2018 @01:15PM (#16813286)
Why?
Re:Why SQLite Does Not Use Git by krylon on Wednesday April 11, 2018 @11:17AM (#16811963)
At work, I use fossil to manage my repository of scripts that I edit and use on different machines. (Strictly speaking, that could be done without an SCM, but I find it more convenient this way.)

On Windows, that fact that fossil comes as a single statically-linked executable that works without any special installation procedure[0] is really nice.

Also, I have to appreciate the builtin Wiki. I use it to keep a kind of diary of what I did and why, as well as gather helpful links I have come across over time.

[0] Other than putting the executable somewhere on your %PATH%, of course.

Re:Why SQLite Does Not Use Git by lsaferite on Tuesday April 10, 2018 @11:08PM (#16807729)
So, being a fan of Fossil would make you a Hippster then, no?

O_o I'll find my way out.

Re:Why SQLite Does Not Use Git by lsaferite on Thursday April 12, 2018 @09:54PM (#16826573)
So is it a lack of humor or just missing the joke that's getting the negative score?