X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fgit-mirror.sh;h=c692fa671cdd9425b37faf41a8d3fde2ba740568;hb=e2aac83fd96cd7511700103d4a0aadb39e48bdc7;hp=6654727d53d512a7d202f721b6207e92f7334e53;hpb=4dbbab333c0247da1b955e99e38cea36ea4e4984;p=infrastructure.git diff --git a/scripts/git-mirror.sh b/scripts/git-mirror.sh index 6654727..c692fa6 100755 --- a/scripts/git-mirror.sh +++ b/scripts/git-mirror.sh @@ -203,27 +203,30 @@ function mirror_repo () { } #################### -# hook to simpler, pull-only repos -# e.g. /git-slave/tophat.git on onelab.eu -# the idea here is, we need to keep a local read-only mirror -# of some repositories -# instead of hacking this script that is already scary, I preferred to write -# a separate script git-update.sh that runs a bit like auto-update.sh -# and that also takes care of remote branches -# so the overall the layout is as follows +# hook to simpler, pull-only repos - the idea here is, +# we need to keep a local read-only mirror of some repositories +# +# e.g. /git-slave/tophat.git on onelab.eu which is a mirror of +# git.top-hat.info/tophat.git that can't easily be exposed as a git feed +# +# instead of hacking this script that is already scary, +# I preferred to keep these simpler +# +# so the overall layout is as follows # * manually created the local mirror by running # cd /git-slave -# git clone ssh://tophat@git.top-hat.info/tophat.git -# which creates a non-bare repo right under /git-slave -# * create a symlink for git-daemon +# git clone --mirror ssh://tophat@git.top-hat.info/tophat.git +# which creates a *bare* repo /git-slave/tophat.git +# * create a symlink for git-daemon and for gitweb # cd /git -# ln -s /git-slave/tophat/.git tophat.git +# ln -s /git-slave/tophat.git +# Being a symlink this won't be considered by the main purpose of git-mirror.sh function slave_repo () { git_slave=$1; shift cd $git_slave for subdir in *; do - [ -d $subdir/.git ] && git-update.sh $subdir + [ -d $subdir/.git ] && (cd $subdir ; git fetch -q ) done }