Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

t/mirror_switch

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

Signed-off-by: Jiang Xin <jiangxin@ossxp.com>
  • Loading branch information...
commit 1ee86ebf60ab1cee5b42634818cbfc4cc490fc82 1 parent fcb098b
Jiang Xin authored jiangxin committed

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +7 0 hooks/common/post-receive.mirrorpush
7 hooks/common/post-receive.mirrorpush
@@ -21,4 +21,11 @@
21 21
22 22 slaves=`git config --get gitolite.mirror.slaves`
23 23 [ -z "$slaves" ] && exit 0
  24 +if [ "$(git config --bool gitolite.mirror.disabled)" = "true" ]
  25 +then
  26 + echo "**************************************************"
  27 + echo "WARNING: mirror disabled for this repository."
  28 + echo "**************************************************"
  29 + exit 0
  30 +fi >&2
24 31 $GL_BINDIR/gl-mirror-push $GL_REPO $slaves

0 comments on commit 1ee86eb

Please sign in to comment.
Something went wrong with that request. Please try again.