Skip to content

Commit

Permalink
more mirroring changes...
Browse files Browse the repository at this point in the history
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...)
  • Loading branch information
sitaramc committed Mar 21, 2011
1 parent afc3a06 commit e837d7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hooks/common/post-receive.mirrorpush
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e837d7a

Please sign in to comment.