Problem involving Ruby, git and cron

Sorry to post this here, it’s really a combined Ruby/Linux/Git problem
but
I’m hoping someone here can point me in the right direction. I’ve
written a
Ruby script that exports all known branches of some git repos to static
files, and optionally performs builds of JavaScript projects. It looks
like
this:

To run: save this in a file, e.g. ~/widgets/export, make it executable
and
perform the following in the ~/widgets directory:

chmod +x export
mkdir repos
mkdir static
cd repos
git clone git://github.com/jcoglan/heist.git
git clone git://github.com/jcoglan/js.class.git

Also, install these:

sudo gem install hoe grit jake

Then, go back to your home dir and run the script:

cd ~
widgets/export

You should see a ton of stuff appear in the ‘static’ dir. Also notice
that
the contents of static/js.class/0.9.0 and static/js.class/2.0.0 (for
example) are different. Next, set this script up to run under cron using
‘crontab -e’ (First digit is the minutes past the hour the script will
run.
Replace my username with your own.)

crontab -e
40 * * * * /home/jcoglan/widgets/export

Wait for the script to run, then inspect the directories again. All
versions
of js.class are now the same, whereas the heist versions are still
distinct.
Also, If I remove the heist repo, js.class exports correctly.

I’ve no idea why any of this should be the case: any help would be very
gratefully received!