Live data from Hacker News

Why SQLite does not use Git (2018)

sqlite.org

411–420 of 454 posts

Re: Why SQLite does not use Git (2018)

#411
post #221

Earlier quoted context omitted.

To paraphrase Bjarne Stroustrup, there are only two kinds of version control systems: the ones people complain about and the ones nobody uses.

It's very much a "glass half full" perspective, which gets tiresome from somebody like Bjarne who is very resistant to the idea that he's made mistakes. It excuses lots of bad mistakes because hey, if people really felt that way they wouldn't use C++ right? But of course increasingly they aren't using C++ because it sucks, which is why they were complaining. Unlike C++, Git has put considerable work into responding t…

No, it was Bjarne saying "We definitely did make some mistakes, but we got enough of the important things right."

Re: Why SQLite does not use Git (2018)

#412
post #240

Earlier quoted context omitted.

Unless you're checking out old commits, `git clone --depth=1`. Then you get close to the ideal download size for any given repo.

If that is ideal why is it not the default?

Because it's unexpected behavior and not what you want most of the time. It's ideal in the sense of bytes on the wire.

Re: Why SQLite does not use Git (2018)

#413

Earlier quoted context omitted.

Git actually is bundling a lot of stuff you probably don't realize. Run 'git instaweb' for example and it will spin up a local CGI server and perl CGI script to give a very simple web UI: https://git-scm.com/docs/git-instaweb Fossil isn't much different in core functionality here. There is a ton of email client integration and functionality in git too that most people who only use GitHub probably have absolutely no i…

I tried that (primarily because I didn't know about it and was excited), but it didn't work. It needs me to install "lighttpd" to work. And the steps to install that are not straightforward. I like that a lot of functionality is not bundled up in the git that I have already installed in my computer, but at the same time, I agree with the fact that adding these separate binaries is not easy as a user.

Uhm, `sudo apt install lighttpd` - or equivalent?

Re: Why SQLite does not use Git (2018)

#414
post #382

Earlier quoted context omitted.

> For one, it is more complicate to keep track of which of the many shared libraries on a typical system are used by which application. It is common that the same library occurs multiple times in different versions, built by different people/organizations and residing in different directories. That's not common at all, man. I strongly recommend you don't do that. > Quick, without looking: which TLS library do your ne…

> What do you mean "which versions of which libraries"? If you upgrade a shared library to fix a problem, how do you know that the application has been tested against the fixed version? And no, your package manager won't know. Congratulations on a) not having multiple installs of shared libraries on your system and b) for knowing which version you have. Knowing this isn't very common.

> If you upgrade a shared library to fix a problem, how do you know that the application has been tested against the fixed version?

Distro's like Debian solve that problem by not upgrading. The only things deemed worthy of "fixing" are security issues, and they are fixed by backporting the fix (only) to the existing shared library. Thus no API's (of any sort - even unofficial ones like screen scraping) are upgraded or changed, so no testing is necessary.

And thus:

> And no, your package manager won't know.

It doesn't have to know, because the package manager can assume all releases for Debian stable are backward compatible with all the packages in that release.

A lot of the noise you see on HN comes from people using distro's on their desktops. To them a distro is a collection of pre-packaged software with all the latest shinies, which they upgrade regularly. But Linux's desktop usage is 3%, whereas it server usage is claimed to be over 95% (which eclipses Windows Desktop share). Consequently distros are largely shaped not by the noisy desktop users, but by the requirements of sysadmin's. They need a platform that is guaranteed both stable and secure for years. To keep it stable, they must solve the problem you describe, and for the most part they have.

Re: Why SQLite does not use Git (2018)

#415

Earlier quoted context omitted.

> > The closest I have found is the network, which is slow to render (unless it is already cached), does not offer nearly as much details, and scarcely works at all on mobile. (The preceding text in TFA makes it clear that this refers to rendering a view of history. This is in a section titled "Git does not provide good situational awareness".) Here's the thing: if you use a rebase workflow then all history will be l…

> if you want to understand your work -and also others to understand your work- it seems much better to rebase and resolve conflicts commit by commit I do love rebase workflow and push it everywhere I can. But that's just not true. Conflict resolution with git-rebase is just horribly implemented. Working even one conflict through a sequence of five commits is so hopelessly repetitive and error-prone operation that it…

I have a script I use to rebase through thousands of commits: https://gist.github.com/nicowilliams/ea2fa2b445c2db50d2ee650...

Re: Why SQLite does not use Git (2018)

#416

I'm glad Fossil works for them, but this line is bothered me: > In contrast, Fossil is a single standalone binary which is installed by putting it on $PATH. That one binary contains all the functionality of core Git and also GitHub and/or GitLab. It manages a community server with wiki, bug tracking, and forums, provides packaged downloads for consumers, login managements, and so forth, with no extra software require…

The concept that you can isolate "one thing" and it's not in itself "a set of other things" is a very nasty myth in the world of programming. Everything is composite. Everything is a pipeline of commands. Made of things. The "job to do" is in the eye of the beholder, not absolute. The "single responsibility principle" is not applicable in reality. It's always a tradeoff of maintaining a balance of cohesion and modula…

I'm not sure where I stand in this whole argument, but

> The "job to do" is in the eye of the beholder, not absolute.

It's definitely the case that the less sophisticated the user, the more requirements they can pack into a sentence.

Re: Why SQLite does not use Git (2018)

#417

Earlier quoted context omitted.

> > The closest I have found is the network, which is slow to render (unless it is already cached), does not offer nearly as much details, and scarcely works at all on mobile. (The preceding text in TFA makes it clear that this refers to rendering a view of history. This is in a section titled "Git does not provide good situational awareness".) Here's the thing: if you use a rebase workflow then all history will be l…

> At Sun we had a strict linear history mandate Out of curiosity: Was this also with TeamWare/SCCS? > If you care about history, what you really want is to see what's changed over time, and that is always linear. At time t_n you have some commit, and at t_n+1 you have some other commit, and so on. Depends on what the history should represent or what you care about specifically, or optimize for. What landed in the int…

> Out of curiosity: Was this also with TeamWare/SCCS?

Yes. It was quite primitive by comparison to git, but it worked.

> > If you care about history, what you really want is to see what's changed over time, and that is always linear. At time t_n you have some commit, and at t_n+1 you have some other commit, and so on.

> Depends on what the history should represent or what you care about specifically, or optimize for.

> What landed in the integration branch or was deployed to a singular test environment is certainly linearily ordered on the time scale. What happened during parallel development is rather a DAG. (And even there you could have different working models: clean up (e.g. with git rebase), then integrate; or keep every commit ever made (even if hidden in presentation), fossil-style.)

At Sun if you had a bug fix you did the equivalent of clone, commit, , push.

But for large projects we did something very different. We had a clone of the upstream (OS/Net) for the whole project, and developers would clone the project and work on that. Every few weeks (two or four, depending on the project) the project's gatekeeper would rebase the project clone onto the upstream, and then all the developers would rebase their clones onto the project clone. (Think `git rebase --onto`.)

When a project completed successfully it would rebase one more time onto upstream and push.

These clones functioned as branches. They were archived, but in the upstream there was no evidence left of the clones' existence -- certainly there were no merge commits, as those were verboten.

As you can see, there was no complex DAG in the upstream: it's all linear. The history of the clones was mostly irrelevant, though if really cared (sometimes I did) you could go look at the archives.

> However, with rebasing on top (or squash-merges) you lose the commits in their original context.

Why should anyone care about that "original context"? The project/bugfix delivered. Between the upstream's HEAD as just before delivery, and after, are just the differences contributed by that push, and the commit messages for the commits in that push, and the deltas in each of those commits, are all the context you need.

> You may have no merge-commits, but all your commits are merged commits.

So what?

> (They only have one parent in version history, but the file content is the result of a merge, be it automatic or manual.)

This is like caring about seeing every typo or braino the developer made while working on that code. It's just not useful. Once the code is pushed upstream the conflict resolutions that the author had to do will never again matter to anyone else.

If you wanted to investigate what went wrong in a mishap -a mismerge- you can: examine the downstream clone's history (including reflog). If nothing went wrong, you're done. You can archive those downstream clones (or the relevant bits of their reflog), which, again, we did at Sun precisely for this reason.

If you use a merge flow, those merge commits are forever, and they will forever pollute the history and complicate rendering of history, and they will remain long after anyone could possibly care about what might have gone wrong in a mismerge.

> This may no big deal for things you can and do test for. If finding out a bug later however, it is often easier to comprehend, if one can see or test, if that happened only while integrating the changes. Then you have at least still the working version from the tip of the branch available for comparison.

Ok, so you're concerned about investigations. Again, they're rare, and there's a way to do them without polluting the upstream's history.

Perhaps there could be something like merge commits that aren't commits but annotations that are not part of the Merkle hash tree and which can be deleted, or which are in the Merkle hash tree but hidden, and where if you want to find out the details of what the developer did you still have to go dig in their clones. But IMO that's still mostly pointless.

Re: Why SQLite does not use Git (2018)

#418

Earlier quoted context omitted.

> > The closest I have found is the network, which is slow to render (unless it is already cached), does not offer nearly as much details, and scarcely works at all on mobile. (The preceding text in TFA makes it clear that this refers to rendering a view of history. This is in a section titled "Git does not provide good situational awareness".) Here's the thing: if you use a rebase workflow then all history will be l…

> At Sun we had a strict linear history mandate Out of curiosity: Was this also with TeamWare/SCCS? > If you care about history, what you really want is to see what's changed over time, and that is always linear. At time t_n you have some commit, and at t_n+1 you have some other commit, and so on. Depends on what the history should represent or what you care about specifically, or optimize for. What landed in the int…

Did you join HN just to comment on my comment? That's funny.

Re: Why SQLite does not use Git (2018)

#419
post #213

Earlier quoted context omitted.

I think [0] indicates that it does scale quite well, you can even test by comparing the 2. You can go from cloning to pushing on a repo in half the time. There's branches as well, so while the /timeline[1] seems too busy, you can always drop back to a forum or the bug tracker, which it has already. time fossil clone https://fossil-scm.org/ time git clone https://github.com/drhsqlite/fossil-mirror My results were foss…

There is something fishy with the repo on github. git repack -a -f -d du -sh .git 65M .git It's also significantly faster to clone after the repack: time git clone --mirror https://github.com/drhsqlite/fossil-mirror 65.10s user 21.22s system 35% cpu 4:05.92 total time git clone --no-local fossil-mirror fossil-no-repack 26.92s user 2.99s system 155% cpu 19.190 total git -C fossil-mirror.git repack -a -f -d time git cl…

I imagine fossils internal git export function is not robust. Even when you {fossil git export} the repo, you still get a much bigger .git than fossil (20mb more), with errors on some checkouts. Repacking doesn't do much either in this case, so the functionality changes.

Re: Why SQLite does not use Git (2018)

#420
post #267

Earlier quoted context omitted.

It's important to distinguish between 'local disagreements' and 'social disagreements'. The former are things that don't affect anyone else. Eg your co-workers don't care if you your remotes 'origin' and 'upstream', or 'fork' and 'origin'. The latter are things you need to coordinate on with other people. Eg how you want your git history to look like in the end.

But my point is even the social disagreements are only social for your repo. For the entirety of git they are local disagreements.

For your point, I would introduce another conceptual level. Perhaps named, 'local', 'social per repo', and 'global'.

Squishing 'local' and 'social per repo' sweeps away on important distinction, IMHO.

Post reply on HN