开发者

gitolite: add the same config to all repos

I want to auto add the same config values for all my repos managed by gitolite. I assumed that adding the following to gitolite.conf would do the trick:

rep开发者_JS百科o @all
    config hooks.mailinglist = me@example.org

Although gitolite doesn't complain when I push, none of the @all config items get added to the individual repos (although any specific ones do).


The gitolite documentation does mention that is is a "repository specific" mechanism only, which means that groups of repository don't seem to be supported.

The implementation seems to confirm that, since the comment preceding the actual git config states:

IMPORTANT NOTE: next 3 subs (setup_*) assume $PWD is the bare repo itself

And that is follow by the function doing the git config:

# ----------------------------------------------------------------------------
# set/unset git configs
# ----------------------------------------------------------------------------

sub setup_git_configs
{
    my ($repo, $git_configs_p) = @_;

    while ( my ($key, $value) = each(%{ $git_configs_p->{$repo} }) ) {
        if ($value ne "") {
            $value =~ s/^"(.*)"$/$1/;
            system("git", "config", $key, $value);
        } else {
            system("git", "config", "--unset-all", $key);
        }
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜