Permalink
Browse files

t/mirror_switch

Do not mirror repository if set gitolite.mirror to false.

Signed-off-by: Jiang Xin <jiangxin@ossxp.com>
  • Loading branch information...
Jiang Xin authored and jiangxin committed Nov 27, 2011
1 parent fcb098b commit 1ee86ebf60ab1cee5b42634818cbfc4cc490fc82
Showing with 7 additions and 0 deletions.
  1. +7 −0 hooks/common/post-receive.mirrorpush
@@ -21,4 +21,11 @@
slaves=`git config --get gitolite.mirror.slaves`
[ -z "$slaves" ] && exit 0
+if [ "$(git config --bool gitolite.mirror.disabled)" = "true" ]
+then
+ echo "**************************************************"
+ echo "WARNING: mirror disabled for this repository."
+ echo "**************************************************"
+ exit 0
+fi >&2
$GL_BINDIR/gl-mirror-push $GL_REPO $slaves

0 comments on commit 1ee86eb

Please sign in to comment.