[webkit-dev] Should we consider switching to git over svn?

Lars Knoll lars at trolltech.com
Tue Oct 9 01:22:26 PDT 2007


I'll just add my 2 cents here. I'm very much in favor of switching over to git 
at some point. There are many reasons for that, but I'll try to highlight the 
main ones that come to my mind (in addition to the ones Oliver mentioned 
already):

* local repository and working offline: I often have to work offline (e.g. 
when travelling). With svn this is a pain (yes, I know about svk, but then 
I'm better off using git-svn) to do. git-svn solves most of it for me.

* smaller and more atomic submits: We've been using git quite a bit internally 
in Trolltech now. What we've seen from all people that have moved over to 
using git is that submits become a lot smaller and more atomic. With svn, you 
have to create one patch that makes it all work before being able to get a 
review. With git it's trivial to ask for review of a series of commits that 
belong together.

* easy branching and merging: Larger refactoring work is currently very hard 
to do without creating large disturbances for all ports/platforms. This will 
just get harder as more ports start to appear. In git it's very easy to 
create a branch for the refactoring work, start out on one port, then fix up 
all the other ports and once everything is done merge the branch back.

* tracking a branch: For our first release we want to track the branch that 
will be shipped on Leopard as close as possible. However we might need to add 
some changes on top that might conflict with the submit policy Apple would 
like to see for that branch. Following that branch in git is trivial by just 
pulling in all changes from Apples branch in regular intervals. In svn it's a 
pain to do. At the same time we want to make sure all our changes also make 
it into the development branch, which again is a real pain in svn.

* Branches and merging: To put it short: Support for branches in svn sucks big 
time. Oliver spend a lot of time rebasing the feature branch onto current 
ToT. With a vcs that has good support for branching and merging built in, 
this time could have been significantly reduced, esp as the feature branch 
would have merged in regular intervals from ToT to keep the diff at a 
minumum.

* Lots of cool features for advanced usage: git-bisect, git-stash, ....

* No more need for a ChangeLog ;-)

* Last but not least: Internally in Trolltech a lot of developers are 
currently using git on top of perforce¹. Every single developer that has 
tried git and come over the initial learning curve loves it and doesn't want 
to move back to perforce. The only thing they complain is that we currently 
still have perforce underneath.

Cheers,
Lars

¹ Just a note on perforce: it's similar in many ways to svn by being a 
centralized VCS. The main difference is that perforce has decent support for 
branching and merging branches. In addition git-p4 is a lot faster and more 
convenient than git-svn (it includes e.g. all our branches).

On Tuesday 09 October 2007, Oliver Hunt wrote:
> In recent weeks/months a number of webkit developers have started
> using Git for day to day development, and have found it very useful.
> Git is yet another revision control system, but unlike RCS's such as
> cvs and svn it allows local branches and makes merging branches much
> easier.  In addition to making bracnhes much more manageable, it has
> a few other advantages:
>    * Speed: Git is much faster than svn (which becomes very valuable
> on windows,
>    * History: Git's history is much nicer than that of svn,
> especially with regards to patches submitted by people without commit
> rights, as it is able to distinguish the author of a patch from the
> person who committed it.
>    * Collaboration:  It is possible for people to publish their git
> tree's in a way that allows them to be tracked by others, allowing
> people to collaborate on bugs and/or features much more easily
> without actually committing to a central repository.
>
> Unfortunately, git is still not as user friendly as svn, and has a
> relatively steep learning curve (largely due to it using some similar
> commands to svn for completely different purposes :-/ )
>
> On the other hand, those of us using git currently have to use the
> git-svn bridge which, while functional, is somewhat slow.  I think
> (and i'm hoping others agree) that despite the slightly more complex
> interface the improved merging, branching, and speed mean that we
> should seriously consider switching to git as our primary RCS.
>
> Any comments from others are welcome.
>
> --Oliver
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev





More information about the webkit-dev mailing list