Updating the mail notification hook used for the fedora-web git repository
Ricky Zhou
ricky at fedoraproject.org
Tue Aug 18 15:19:46 UTC 2009
On 2009-08-16 07:10:52 PM, Todd Zullinger wrote:
> I was thinking about updating the mail notification hooks used in the
> fedora-web git repository. We switched the infrastructure puppet
> repository to these a month or so back and they have worked well. The
> output is a bit nicer than the current hook and it is called from the
> proper place (the post-receive hook rather than the update hook that
> is currently (ab)used for this).
>
> Partly, I'd like to convert things so we can get wider testing of the
> newer hook scripts, with an eye toward eventually converting most of
> the other hosted repositories to these scripts. To that end, I
> whipped up a short shell script to do the dirty work:
>
> http://dpaste.com/hold/81486/
>
> The script is also at ~tmz/bin/git-mail-hook-update on hosted1.
>
> I also noticed while looking at the config file for fedora-web.git (on
> hosted1) that we don't have receive.denyNonFastForwards set. This
> might be something good to enable. It prevents pushing updates that
> are not fast forwards, even if the --force option to push is used.
>
> This option is set when initializing a shared repository. I think
> that when the fedora-web git repo was setup on fedorahosted.org that
> it was not created as a shared repository. Either that or it was done
> so long ago that the git version in use did not do this by default.
>
> My bet is on the former, as the config also has 'bare = false' and
> some other options that are not typically set when creating a bare,
> shared, repository -- like having branch and remote settings.
>
> So with permission, I'd also like to update the config file to look
> like this (as well as adding the hooks.mailinglist setting):
>
> [core]
> repositoryformatversion = 0
> filemode = true
> bare = true
> sharedrepository = 1
> [receive]
> denyNonFastforwards = true
>
> The diff with the current config is:
>
> --- /git/fedora-web.git/config~ 2009-01-08 21:19:38.000000000 +0000
> +++ /git/fedora-web.git/config 2009-08-16 22:05:51.000000000 +0000
> @@ -1,12 +1,7 @@
> [core]
> repositoryformatversion = 0
> filemode = true
> - bare = false
> - logallrefupdates = true
> + bare = true
> sharedrepository = 1
> -[remote "origin"]
> - url = /git/fedora-web.git
> - fetch = +refs/heads/*:refs/remotes/origin/*
> -[branch "master"]
> - remote = origin
> - merge = refs/heads/master
> +[receive]
> + denyNonFastforwards = true
>
> Sound good?
Sounds good to me - feel free to make all the change mentioned, and
thanks for checking all of this out!
Thanks,
Ricky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-websites-list/attachments/20090818/84f0c4ed/attachment.sig>
More information about the Fedora-websites-list
mailing list