[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] Switching to git

From: Paolo Bonzini
Subject: [Lightning] Switching to git
Date: Tue, 15 Jan 2008 15:44:11 +0100
User-agent: Thunderbird (Macintosh/20071031)

I converted GNU lightning's Arch repository to git. All development after the 3.0 release will be available only through git and through the new git-cvs gateway (see later). The Arch repositories address@hidden and address@hidden will be available but undocumented (so that they are slowly blurred away by time) and will not be up-to-date anymore. I've added cacherevs of the last revisions to help people who find them by mistake, but that's as much maintainance as I'm willing to do.

It is recommended that you access the repository with git, of course; GNU Smalltalk's Git repository can be accessed through HTTP as well as through the faster Git protocol. Either of the following commands will clone GNU Smalltalk's repository on your machine:

  git clone git://
  git clone

Cloning automatically creates a branch for your work, called master.
After cloning the repository, "git pull" will be enough to update the current branch with any new patch available upstream (i.e. from me).

You can also browse the Git repository within a web browser. Unlike Arch, this is *fast* (well everything is faster than with Arch). You may also view the complete histories of any file in the repository as well as differences among two versions. Gitweb also allows you to get the latest source code as a tarball, like this:

  wget -O lightning-latest.tar.gz \

As with Arch, by setting up your own public repositories for GNU lightning branches, you will facilitate integration of your code into the main distribution. You can find some info at

You can prepare a patch "the old way" just by doing a single commit in your master branch). For GNU lightning it should be enough most of the time: just send out the URL for the branch and the sha1 identifier for the commit (you get it from "git log", the first 8-10 characters are enough) and I'll cherry-pick it. Of course, attach the patch in the e-mail too for simplicity. You can view the diff for a commit 01234ABCD (that's the beginning of the SHA1 checksum) with something like

  git diff 01234ABCD{^,}

For more complicated work, you can also set up a "topic branch". Here you can use "git rebase <BRANCH>" (where <BRANCH> will be usually "master", "origin/master" or "origin/stable-VERSION") to reapply your patches on top of a new branch. This is the same as "tla update", except that it works also if you committed something on the branch. Alternatively, you can use "git merge <BRANCH>" which is the same as "tla replay".

In both cases, use "git merge --squash <TOPIC-BRANCH>" while you're on the master branch to turn the topic branch into a single commit to be sent out the same way.

The "git rebase" example will have shown you that unlike Arch, git is quite happy to rewrite history unless you've already pushed upstream. In "topic branches" of course you are more free, because you probably won't push them until you're done with them. Interesting commands to do so include:

"oh no, I forgot the ChangeLog"
git commit --amend

"oh no, I forgot --amend"
"the fix is a one-liner, but I committed the buggy patch two weeks ago"
git rebase --interactive HEAD^^^^

There *is* one thing you'll miss switching from Arch to git, namely "tla missing". Everything else will be sweet.

Anonymous CVS access

Alternatively, a CVS repository can be checked out through anonymous CVS with one the following commands (again, respectively for the stable and development branches).

  cvs -d :pserver:address@hidden:/lightning.git \
    co -d lightning HEAD

When you update from within the checked out directory you do not need the -d options anymore:

  cvs update


reply via email to

[Prev in Thread] Current Thread [Next in Thread]