diff options
author | Sitaram Chamarty <sitaram@atc.tcs.com> | 2011-03-16 19:21:31 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaram@atc.tcs.com> | 2011-03-21 07:53:50 +0530 |
commit | e837d7a4b930c36bd85a6fe5eaafd8aab76960dc (patch) | |
tree | 8fe1d589b016f62451141b1f3c6b308d7922d3f0 | |
parent | mirror-shell fix: setup GL_RC; post-update needs it (diff) | |
download | gitolite-gentoo-e837d7a4b930c36bd85a6fe5eaafd8aab76960dc.tar.gz gitolite-gentoo-e837d7a4b930c36bd85a6fe5eaafd8aab76960dc.tar.bz2 gitolite-gentoo-e837d7a4b930c36bd85a6fe5eaafd8aab76960dc.zip |
more mirroring changes...
the first one is commented clearly enough, the second one is a pure bug
(though it wouldn't have affected anything except for the ultra-paranoid
"fsckObjects" config var not being set; no biggie...)
-rwxr-xr-x | hooks/common/post-receive.mirrorpush | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hooks/common/post-receive.mirrorpush b/hooks/common/post-receive.mirrorpush index dd04425..6be6d81 100755 --- a/hooks/common/post-receive.mirrorpush +++ b/hooks/common/post-receive.mirrorpush @@ -4,6 +4,10 @@ # please see doc/mirroring.mkd for instructions on how to use this +# flush STDIN coming from git; we have no use for that info in this hook but +# if you don't do this, git-shell sometimes dies of a signal 13 (SIGPIPE) +[ -t 0 ] || cat >/dev/null + if [ -n "$GL_SLAVES" ] then for mirror in $GL_SLAVES @@ -14,7 +18,7 @@ then else ssh $mirror mkdir -p $GL_REPO.git ssh $mirror git init --bare $GL_REPO.git - ssh $mirror git config receive.fsckObjects true + ssh $mirror "cd $GL_REPO.git; git config receive.fsckObjects true" git push --mirror $mirror:$GL_REPO.git || echo "WARNING: mirror push to $mirror failed" fi |