gitolite/hooks/common/post-receive.mirrorpush

23 lines
559 B
Plaintext
Raw Normal View History

#!/bin/bash
# gitolite mirroring
# please see doc/mirroring.mkd for instructions on how to use this
if [ -n "$GL_SLAVES" ]
then
for mirror in $GL_SLAVES
do
if git push --mirror $mirror:$GL_REPO.git
then
:
else
ssh $mirror mkdir -p $GL_REPO.git
ssh $mirror git init --bare $GL_REPO.git
2010-10-26 15:56:31 +02:00
ssh $mirror git config receive.fsckObjects true
git push --mirror $mirror:$GL_REPO.git ||
echo "WARNING: mirror push to $mirror failed"
fi
done
fi >&2