HN user

vadishev

8 karma
Posts3
Comments5
View on HN

I think the next SCM tool to Git, is what a Jetbrains IDE is to a text editor. It's an integrated environment on top of Git which deeply understands your code structure, dependencies, etc.

To be honest, I doubt better submodules are gonna help you overtake Git, there's too much inertia in this market. Take for example Mercurial which is a great tool and exists forever, yet it still lost its battle to Git.

I'd rather believe that submodules are fixed at some point or an alternative solution appears that works much better. Git subtree is around for a while and there's also Git X-Modules https://gitmodules.com which is modules on the Git server.

The article does not explain why Git is that much more efficient. It has some thoughts in the right direction though.

Obviously, SVN and Git have different delta-compression techniques. For a given SRC and DST files, Git's algorithm puts COPY instruction from any position at SRC file. Subversion however restricts COPY instructions to be sequential, i.e. the consumer of generated instruction stream doesn't perform random reads at SRC in order to produce DST.

For the sake of simplicity, let SRC='aabc' and DST='aaxyaa':

Git instruction stream:

  COPY   'aa'
  INSERT 'xy'
  COPY   'aa'
SVN instruction stream:
  COPY   'aa'
  INSERT 'xyaa'
As result delta-encoded DST file is more compact in Git repository than in Subversion. What are the drawbacks of Git's approach? Good exercise for the reader.