News for hackers. Stuff that matters.
Re:Is Git Irreplaceable? (2019) by ken on Monday January 06, 2020 @07:49PM (#21975457)
But did you think that RCS, CVS, or SVN were also good enough? Or is this new?
Re:Is Git Irreplaceable? (2019) by jerf on Monday January 06, 2020 @08:09PM (#21975642)
Speaking personally, definitely no. Even before I heard of git, I did not like SVN. In particular, it made an error I don't hear many other people mention where directories were checked out to revisions, rather than entire repositories. Consequently it was very easy to accidentally update just a subset of your repository, and have your whole repository in a state that didn't exist in the version control system at all. There were several times there were builds that were completely unreproducible because it turned out that they were, technically, r83726, except this directory was r84713, but this other directory was r78372 except for a subdirectory that was r84299, etc.

That problem I saw even before I saw a replacement.

But once I saw git, having a full copy of the repo was pretty killer. It was also better at merging, partially for having the history local. In fact I recall some SVN people protesting at the time that merging wasn't so hard, but in a nutshell, they were just wrong. It was harder. Source control that can't merge fluidly is pretty limited from the get-go. There's literally entire dimensions of things we do with git that were so impractical with SVN that only the very largest projects could afford to do them, with the whole "workflow" question. Now you don't even hear about the difficulties of merging since all the open source SCMs copied each other and "good merging" is just table stakes now.

The problem is is that git doesn't really have fatal flaws, it has annoyances, and that's not the same thing. "The UI is difficult" is an annoyance for its target audience. Most every other criticism I've seen of it is an annoyance, not a fatal flaw. Fossil doesn't solve a problem I have with git. It has some neat ideas and arguably does solve some problems, but it doesn't solve the problems I have with git; you could lift Fossil's solutions to wiki and bugtracking and just put them in Git and I'd probably be happier with that than Fossil itself.

The problem isn't that Fossil is an SCM competing with git; the problem is that Fossil is a monolith competing with the rapidly-moving git ecosystem. The former is perhaps beatable, the latter is a juggernaut. All of Fossil's other features sitting in git is something that might get somewhere, but if the base source control isn't git-based, I can't sneak it into a work project to try it out. I've got a corporate mandate that all source belongs somewhere standard, and it's a perfectly sensible requirement for someone paying me to do a job.

Re:Is Git Irreplaceable? (2019) by _ZeD_ on Tuesday January 07, 2020 @01:33AM (#21977522)
>>> [SVN] made an error I don't hear many other people mention where directories were checked out to revisions, rather than entire repositories.

that is a feature! You don't know how I miss that!

(that, and the handling of blobs)

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:01AM (#21979918)
I would check, double-check, and triple check whatever use case you miss that for. It is a serious misfeature, and I find any workflow that critically depends on it to be very likely a process smell.

Handling of blobs I can at least see preferring the differences, though git-lfs mostly acceptably shims that for me. The need to use git-lfs is definitely an annoyance, but it's another place where it's probably not a fatal flaw.

Or, to the extent that it arguably is, it would be when you're using git as something that it really, really isn't... it's a source code management tool. It's a good enough source code management tool that it's useful for many other things as well, like the way some people directly drive their personal websites with it. But it isn't a tool for managing lots of large files that can't be textually diffed, not a generic "content" management tool. I wouldn't expect git to necessarily store terabytes of video files, but then, it's not like Fossil is going to do that either from the sounds of it. git-lfs shims content blobs well enough to make it just an annoyance for source code management.

Re:Is Git Irreplaceable? (2019) by shakna on Tuesday January 07, 2020 @02:16AM (#21977749)
Git still let's you check out particular directories at particular commits. It's just a specialised usecase rather than the default.

    git --work-tree=/path/to/outputdir checkout HEAD -- subdirname
Re:Is Git Irreplaceable? (2019) by dev_north_east on Tuesday January 07, 2020 @09:20AM (#21980088)
> that is a feature! You don't know how I miss that!

Yep, handiest way to perform a first pass on narrowing down an introduced bug between a few commits.

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:24AM (#21980131)
Have you used "git bisect"?
Re:Is Git Irreplaceable? (2019) by dev_north_east on Tuesday January 07, 2020 @11:18AM (#21981353)
Just reading up on it now. Seems interesting, might give it a shot next time.
Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @12:17PM (#21982017)
In the case you mentioned of "just a few commits" it's of marginal utility, because you can do that manually almost as quickly, but it's a killer when it comes to "I don't really know when we introduced this" and you have to sift over thousands of commits. Unfortunately, it requires that you have the discipline to keep every commit on the relevant branches buildable (enough so to find the bugs), which is something you can do going forward but can't retroactively apply to a code base very well.
Re:Is Git Irreplaceable? (2019) by wyoung2 on Wednesday January 08, 2020 @03:03PM (#21995171)
Agreed. Bisecting a deep and complex version history can be a lifesaver, especially under a time crunch.

Fossil has bisecting with much the same CLI as Git, for what that's worth.

Re:Is Git Irreplaceable? (2019) by bhaak on Tuesday January 07, 2020 @05:55AM (#21978815)
None of the other big VCS had fatal flaws. If they had fatal flaws, they wouldn't have been used.

Sure, not being able to rename a file easily in CVS was quite an annoyance but nothing that made it completely useless.

There were always workarounds. But exactly those areas were workarounds or better tooling patches over stuff Git doesn't do are the areas that a possible successor will address.

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:02AM (#21979930)
"None of the other big VCS had fatal flaws. If they had fatal flaws, they wouldn't have been used."

That's just quibbling about definitions in fuzzy English. If you want to insist they weren't "fatally flawed" at the time, fine, but they certainly are relative to 2020 even by your definition.

Re:Is Git Irreplaceable? (2019) by bhaak on Tuesday January 07, 2020 @02:28PM (#21983710)
They still work. You can still develop with them. In that sense they aren't fatally flawed even today.

2018, 16% still used Subversion. https://insights.stackoverflow.com/survey/2018#development-p...

But that's the hope, that we have something better by 2040, that makes today's Git look as outdated as CVS/Subversion looks to us now.

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @02:35PM (#21983811)
You're really doubling down on applying deliberately hostile definitions to what I said, aren't you? I get to tell you what I meant. You don't get to pick the definitions I was using, especially after I told you you explicitly you picked the wrong one.
Re:Is Git Irreplaceable? (2019) by bhaak on Tuesday January 07, 2020 @05:18PM (#21985697)
You didn't really define what you meant with "fatal flaws". You just claimed that git didn't have them.

But if your Subversion example is one of those fatal flaws, then I just link to his example of Git usage that probably happens more often than we want to admit https://xkcd.com/1597/

Using your tool wrong is not a fatal flaw of the tool.

Re:Is Git Irreplaceable? (2019) by EdSchouten on Monday January 06, 2020 @08:09PM (#21975641)
I don't think there are many people that considered CVS good enough, even back in the days. For example, there was no way for end-users to retain the history of a file when renaming/copying it. When the FreeBSD project still used CVS, committers always had to file tickets against the admins to ask them to do it server-side through a so-called 'repocopy':

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=106080

Re:Is Git Irreplaceable? (2019) by int_19h on Tuesday January 07, 2020 @05:23AM (#21978652)
One big thing that DVCS brought to the table were local serverless repos. Now you could version all the things, with very little effort, and promote it to a "proper" repo later.

The other big thing was free cloud hosting for the repos.

Neither of these are unique to Git, obviously, or even introduced by it. It just happened to be the right combination of features and speed at the right time to become the winner of the popularity contest. Kinda like C.

And, just as C is still around, for all its numerous horrible quirks, Git will likely be around for a long time as well.

Re:Is Git Irreplaceable? (2019) by emodendroket on Monday January 06, 2020 @07:55PM (#21975526)
When I started developing the options people were taking seriously were Mercurial and git. At first I was using mercurial, but since everyone else was using git I switched to that. So those are the only ones I've seriously used.
Re:Is Git Irreplaceable? (2019) by sys_64738 on Monday January 06, 2020 @08:31PM (#21975788)
These fell by the way side as they never had consensus of being better than SCCS. Now git has the weight of the Linux kernel behind it which pretty much EOL'd all other source control mechanisms.
Re:Is Git Irreplaceable? (2019) by theamk on Tuesday January 07, 2020 @03:56AM (#21978222)
I don’t think Linux kernel matters that much - only a tiny fraction of the total number of developers use it.

From what I saw, it was git vs hg - which had different philosophies. Hg gave you nice, polished workflow for supported tasks. Git gave you building parts that you can make your own system from. It turned out that enough programmers wanted to build from parts.

Re:Is Git Irreplaceable? (2019) by vnorilo on Tuesday January 07, 2020 @03:46AM (#21978183)
There was a certain hub that had a role in git's rise. Kernel pedigree may lend it credibility but I doubt it's the driving factor.
Re:Is Git Irreplaceable? (2019) by rhabarba on Monday January 06, 2020 @08:39PM (#21975836)
That's like saying Windows has pretty much EOL'd every non-Windows desktop. Citation needed.
Re:Is Git Irreplaceable? (2019) by rumanator on Tuesday January 07, 2020 @01:55AM (#21977635)
> But did you think that RCS, CVS, or SVN were also good enough?

SVN required a centralized server and didn't even supported branching, so no.

Re:Is Git Irreplaceable? (2019) by Falkon1313 on Tuesday January 07, 2020 @02:49AM (#21977930)
Not sure what variant of SVN you were using that didn't support branching, everyone I knew used branches.

It did have problems with occasional inexplicable tree conflicts, which I do not miss. But that's the same as the pain of trying to rebase in git when things have diverged and it just starts spewing repeated conflicts for each and every commit. In either case, the easiest thing to do is make a fresh branch, patch your changes over, and go from there vs. trying to reintegrate the broken branch.

Re:Is Git Irreplaceable? (2019) by rimliu on Tuesday January 07, 2020 @05:21AM (#21978648)
Subervsion did support branching but it was so fragile (especially before version 1.5 or 1.6 I don't remember) that some went out of the way just to avoid using branches in SVN. Those dreaded tree conflicts…
Re:Is Git Irreplaceable? (2019) by adrianmsmith on Tuesday January 07, 2020 @07:17AM (#21979238)
Tree conflicts were only introduced in Subversion 1.6. https://subversion.apache.org/docs/release-notes/1.6.html#tr...
Re:Is Git Irreplaceable? (2019) by rileymat2 on Tuesday January 07, 2020 @02:25AM (#21977804)
I actually prefer SVN and HG style branches where you keep the branch history as a known formal branch, then have one merge back to Trunk. It is unclear to me how far back you are saying SVN did not have branching.
Re:Is Git Irreplaceable? (2019) by adrianmsmith on Tuesday January 07, 2020 @04:12AM (#21978302)
I don't remember a time when Subversion didn't support branches. I'm sure Subversion 1.0 supported branches (although I can't find evidence of that right now, but I also can't find any release notes for Subversion 1.n containing "now we support branches!")

One can argue about what a branch is, for sure. Subversion branches, Mercurial branches and Git branches all have very different implementations.

But the main workflow of creating a feature branch, developing a feature, then merging it back into the trunk/master, has, as far as I know, always been supported in Subversion.

Re:Is Git Irreplaceable? (2019) by rumanator on Tuesday January 07, 2020 @05:55AM (#21978808)
> I don't remember a time when Subversion didn't support branches.

SVN's official response to branching and tagging was to copy directories around in the repository. Arguably that means it does not support branching, at least according to the concept that has been in place for the last decade.

Re:Is Git Irreplaceable? (2019) by adrianmsmith on Tuesday January 07, 2020 @06:05AM (#21978862)
That's true that there was no command "svn branch", there was only the command "svn copy". It's true that command could have been better named, like many Git commands could have been better named.

However, don't let that confuse you. The "svn copy" command creates a new place where you can do independent development, and where afterwards merging back can occur. So it's the same as a branch by that definition.

An "svn copy" is a lightweight copy, with a reference back to the place the copy was made from.

- "svn merge" does its merge by looking at what commits have been made at the original location (since the copy), and the commits to the copy.

- "git merge" does its merge by looking at what commits have been made on the original branch (since the new branch was created) and the commits on the new branch.

So "svn merge" and "git merge" act in the same manner. (Of course there are differences in the algorithm, but I wish to refute the point that Subversion "does not support branching [at all]".)

And if you never use "svn merge" or "git merge", then a branch is just a copy, in either system.

Re:Is Git Irreplaceable? (2019) by rumanator on Tuesday January 07, 2020 @02:42PM (#21983900)
> That's true that there was no command "svn branch", there was only the command "svn copy". It's true that command could have been better named, like many Git commands could have been better named.

It was not a naming issue. It was a bona fide lack of support for a basic feature. The manual itself states quite clearly that in SVN land you create a branch by copying around the entire working directory within your repository. SVN's manual is quite clear on how SVN actually tracks the state of a file system, and not the state of a source code tree. By copying the working directory around the repository you're creating new revisions of your file system. That' it. Just because you can diff two directories it does not mean copying a directory around in a file system is a branch. And nor is it a tag.

Re:Is Git Irreplaceable? (2019) by xorcist on Tuesday January 07, 2020 @06:50AM (#21979092)
Considering CVS had branches, Subversion probably had them from the start or at least some early development version. Very different under the hood though, as you say.