[LLVMdev] git Status Update?

Tobias Grosser tobias at grosser.es
Fri Sep 9 06:38:40 PDT 2011

On 09/09/2011 01:47 AM, Chris Lattner wrote:
> On Sep 8, 2011, at 5:09 PM, David A. Greene wrote:
>>> For me, the question is "why do we *need* to switch our versioning
>>> system?". Nothing is broken with our current model.
>> There are things broken with the current model, though you may not care
>> about them.  It is not possible to conveniently keep a private copy of
>> LLVM and associated projects and sync regularly with upstream.  It flat
>> out sucks.  This is because the svn model is fundamentally opposed to
>> the idea of private repositories.  There's One True Repository and
>> that's it.
> David,

Hi Chris,

> You need to separate "what is good for David" from "what is good for the project".  Encouraging decentralized development and long-lived branches is not actually in the best interest of the project.

I (and probably most of us) agree that we do not want long-lived feature 
branches to be integrated into LLVM. The small, incremental
patches policy works well. It is obvious that long lived feature 
branches highly complicate reviews and will significantly slow down
patch review.

Yet, this is a policy which we can and should enforce during normal 
patch review. The same as we nowadays successfully enforce small, 
incremental patches and discourage big, difficult to review patches.
There is no need to enforce such a policy through the use of svn.

> I agree that there are some (quite minor IMO, like offline commits) advantages that git can provide over SVN for the preferred llvm development workflow.  However, there are also large costs to switch (both in terms of effort, but also in terms of forcing lots of people to learn new things) and the result is going to be *worst* in as many places as it is better.
> I don't see the conversion to Git actually happening until someone can clearly demonstrate a win for the open source project.

I understand it is most probably difficult to see the benefits, that for 
many of us are so obvious. Having used git for a while, I never
want to miss the increased productivity.

Points I believe are important:

- Git reduces the chance of diverting feature branches

When opening a branch with svn, it often happens that the branch and 
trunk divert significantly, because merging with svn involves 
significant effort. git on the other hand simplifies merges a lot, such
that merges happen very often. As a result, a branch rarely diverges 
significantly from trunk.

- Git simplifies cherry-picking and small patches

As git simplifies cherry-picking and encourages the use of small 
patches, it allows to submit patches early and often. Even if you have 
not finished a feature patch yet, you can easily chop-off unrelated, 
supporting patches and submit them straight ahead.

As a result, the nowadays often used two step approach with svn, that
consists of first developing a set of patches and subsequently 
submitting them can often be turned into a model that allows to keep
unfinished patches privately, but at the same time to submit finished
patches at the time they are coded.

There are a lot more benefits of the use of git. Mentioning all is out 
of scope here.


More information about the llvm-dev mailing list