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

updating 131 git repositories in ten seconds



Noticed this trick KDE is using. Git can be configured to use
anonymous git instead of git+ssh for pulls, which allows updating
a lot of repos much faster. Pushing still happens over ssh.

To set it up:

git config --global 'url.git://git.debian.org.insteadOf' 'git+ssh://git.debian.org'
git config --global 'url.git+ssh://git.debian.org.pushInsteadOf' 'git+ssh://git.debian.org'

Now you can run `mr update` in a highly parallel mode, very quickly:

joey@gnu:~/src/d-i/packages>time mr -j30 update 
9.84user 11.00system 0:10.08elapsed 206%CPU (0avgtext+0avgdata 26144maxresident)k

Compare with 38 seconds using ssh with -j30, and many minutes using ssh
without -j. Ok, svn update did used to take only 2 seconds, but not bad. :)

Bonus 1: Also works for every other git repo on alioth. Probably.

Bonus 2: Those without ssh access to alioth can use this trick
to use mr without modifying d-i's .mrconfig.

-- 
see shy jo (all numbers warm cache)

Attachment: signature.asc
Description: Digital signature


Reply to: