Any interest in using git for scm?

Darren Weber dweber at macports.org
Fri Nov 6 12:12:30 PST 2009


On Fri, Nov 6, 2009 at 10:49 AM, William Siegrist <wsiegrist at apple.com>wrote:

> On Nov 5, 2009, at 5:46 PM, Darren Weber wrote:
>
> >
> > After listening to Linus Torvalds talk about git and looking at a video
> tutorial from Scott Chacon, it would seem beneficial to use git for MacPorts
> development.  It appears that git can be used with an existing svn
> repository (man git-svn), or the svn repository could be imported into a new
> master git repository (perhaps host it with github).  Is anyone currently
> using git for MacPorts development?
> >
>
> Mac OS Forge (the hosting provider MacPorts lives on) does not currently
> provide read-write git repos. But we do provide a git mirror of the svn
> repo.  That at least saves you some time when creating your local git repo.
>
> https://www.macosforge.org/post/git-mirrors/
>
> -Bill
>
>
>
>

Hey Bill,

So this means the MacPorts svn tree is already in a git repo that is in sync
with the svn repo - nice!  Thank you for the reference!

This is helpful, for sure:
http://trac.webkit.org/wiki/UsingGitWithWebKit

I found these MacPort installs to be useful:
sudo port install git-core +bash_completion +doc +svn +gitweb
sudo port install gc-utils
sudo port install qgit GitX

One thing in using git with MacPorts is that a remote clone requires the -u
option to specify a non-default path for the location of the git binary on
the remote server (when the remote server has git installed from MacPorts).
That is, on the "client" that connects to a "macports-server", run:

git clone -u /opt/local/bin/git-upload-pack <SRC_REPO_URL> <DIR>

The MacPorts svn checkout is about 230Mb, including:

$ ls macports/
Makefile  base/  doc/  doc-new/  dports/  www/

It's about 11,000 files (without .svn files):
$ /opt/local/bin/gfind ./macports -type f | awk '!/.svn/' | wc -l
   10826

That should be manageable with git.  There is the limitation that git cannot
checkout a subset of the tree (like macports/dports/devel/gc-utils).

In general, it is very interesting to see how git has evolved to solve the
challenges of distributed source code development for the linux kernel.
It's able to handle thousands of files and hundreds or thousands of
contributors, with high performance and integrity criteria.  While it's
healthy to maintain some scepticism about drinking any particular flavor of
cool-aid, the git cool-aid looks impressive ;-)  After listening to the
Google tech talk from Linus, one of the most striking things about git is
the sha1 hash to maintain integrity in the repo objects (other significant
features include the distributed repos for local work, true 'content'
management [full patches, not just file management], staging commits like a
transaction, easier and faster merging, etc.).  The sha1 is used to
guarantee that what goes in is exactly what comes out.  As he put it, this
evolved from an attempt to hack the linux source code when it was managed
under BitKeeper (which did provide a detection for the hacks).  It's not
exactly a security feature, it provides an integrity check and a byproduct
of that is the ability to detect corruption.  The distributed nature of the
git repos is also a default backup system of a sort.

Given the sha1 integrity checks in git (not available in any other scm
yet?), an import of source code from cvs, svn etc. into git is a persuasive
argument.  Are there any faults or gaps in that argument?

Best,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20091106/dc949757/attachment.html>


More information about the macports-dev mailing list