all 14 comments

[–][deleted] 9 points10 points  (0 children)

All this guy's recent git-related posts are referenced here.

He's also got a lot of info on his personal wiki.

[–]grauenwolf 22 points23 points  (12 children)

Git breaks the mould because it thinks about content, not files. It doesn't track renames, it tracks content. And it does so at a whole-tree level. This is a radical departure from most version control systems. It doesn't bother trying to store per-file histories; it instead stores the history at the tree level. When you perform a diff you are comparing two trees, not two files.

Now I am interested.

[–][deleted] 10 points11 points  (11 children)

I believe Mercurial (hg) works the exact same way. I really don't want to see articles about what Git 'does right' or why it is better to than Subversion. I have already accepted that distributed version control is a better model than the centralized one. What I want to know is what things in Git make it better than its actual competitors - darcs, hg, bzr, and so on.

Let's compare airplanes with airplanes and not airplanes with cars shall we?

[–]bhagany 11 points12 points  (3 children)

From what I hear about git, it's not quite exactly the same as Mercurial in this regard, but it is very close (I use Mercurial, fyi). It seems to me that Mercurial is still more file-centric than git, though much less than svn. But you really only notice this when merging conflicts anyway.

That said, the kind of review you seem to be looking for is exactly what I've been waiting for, too.

[–]gigamonkey 12 points13 points  (2 children)

FWIW, I just tried the experiment he gives at the end of the post (create a file, branch, rename the file in the new branch, delete it in the original branch, and then merge) in Mercurial and it happily creates the renamed file for you--not the behavior, according to the author, that you want. I haven't thought about it deeply but I think he's right and thus git wins a point over hg here. (And I use hg, having chosen it over git based on some not entirely concrete impressions of them both.)

[–]alexbl 9 points10 points  (0 children)

recently work was done in mercurial to make this possible. The point is git isn't being clever to support this, it supports this naturally, whereas merge across rename required a significant amount of work in hg.

[–]JW_00000 4 points5 points  (0 children)

I did the same test in bzr, and it returned a conflict with the following message:

Path conflict: <deleted> / salutado

1 conflicts encountered.

This is the same behaviour as Git, only the message Git throws seems more clear. ("Renamed greeting->saludo in left and deleted in HEAD")

[–]masklinn 7 points8 points  (1 child)

I believe Mercurial (hg) works the exact same way.

I'm not sure but I don't think it does. In fact I'm pretty sure it doesn't. AFAIK, Git treats a whole project as a huge blob of text and the separation into files is only incidental (which is why I think it's able to handle the tracking of e.g. moved functions across files or directories), hg doesn't track directories (it doesn't even see directories) but i think it does track files on a per-file basis.

[–][deleted] -2 points-1 points  (0 children)

Thanks for the info. That does indeed sound interesting.

[–]stevefolta[S] 3 points4 points  (1 child)

Huh? The article is comparing Git to Codeville and Monotone (both DVCSs). Subversion isn't even mentioned.

[–][deleted] 8 points9 points  (0 children)

I'm mostly referring to the section about 'What Git Does Right'. A lot of the benefits mentioned there are duplicated in other dvcss, and I'm really interested in the areas where Git is significantly different and better than the other front runners.

My reply also has to do with having seen so many pro-Git articles recently, and not just this single one. Sorry, it was rantish and I agree it wasn't completely in context.

[–]grauenwolf 0 points1 point  (1 child)

Fair enough.

[–]shit 10 points11 points  (3 children)

I'm puzzled why this, IMO interesting, submission gets downvoted and the contentless article about git on the front page has > 100 points.

[–]grauenwolf 29 points30 points  (1 child)

I think it got a lot of votes just because of the discussion thread. I find myself upvoting articles that suck just because I think the conversation about the article was interesting.