News for hackers. Stuff that matters.
Re:Git is cheap by _ikke_ on Tuesday October 16, 2012 @02:06AM (#4658622)
Branching in SVN is not cheap. It basically has to copy the entire directory structure into a new subdirectory (branches directory).

In git, it just creates one file with a 40 byte hex.

Re:Git is cheap by rkangel on Tuesday October 16, 2012 @08:33AM (#4659475)
Errr, no - while that's what you see in the directory tree, that's not how it's done internally. SVN has a data model where multiple paths in the repo tree can point to the same underlying file object, so a branch requires no file copies, just updating what the directory tree looks like. Even that is done in a very efficient way. It might not quite be 40 bytes, but it is negligibly small.

This technique is in fact extremely similar to how Git works.

Re:Git is cheap by andrewaylett on Tuesday October 16, 2012 @02:50PM (#4661266)
Server-side, that's cheap -- it doesn't actually copy any data. Client-side, it's also cheap: you `svn switch` to the new branch, which is identical to your old branch, so only minimal housekeeping on disk (just like git).