Gitosis:设置存储库配置变量

发布于 2024-07-08 21:22:59 字数 61 浏览 3 评论 0原文

有没有办法通过 gitosis conf 设置存储库配置变量,而不是进入每个存储库并直接编辑 conf 值?

Is there a way to set repository config variables through the gitosis conf instead of going into each repository and editing the conf values directly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

审判长 2024-07-15 21:22:59

我认为这是不可能的。
另一方面,构建“瓷器”脚本非常简单,该脚本可以分析 gitosis.conf 中的一些编码 conf 值的特殊注释。
然后将这样的脚本放入提交后挂钩中应该可以解决问题。

I don't think it's possible.
On the other hand, it's quite simple to build "porcelain" script that analyzes your gitosis.conf for some special comments encoding the conf values.
Then putting such script in a post-commit hook should do the trick.

不奢求什么 2024-07-15 21:22:59

注意(10年后,2018年),gitosis早已被gitolite取代。

gitolite 提供了一种通过 gitolite 配置指定配置变量的方法。

语法很简单:

config 节名称.键名称 = 值 
  

例如:

repo gitolite 
      config hooks.mailinglist = [电子邮件受保护] 
      配置 hooks.emailprefix = "[gitolite] " 
      配置 foo.bar = "" 
  

这会执行普通的“git config section.key value”(对于上面的前两个示例)或“git config --unset-all section.key” “(最后一个例子)。
不支持其他形式的 git config 命令(--add、value_regex 等)。

Note (10 years later, 2018), gitosis has long been replaced by gitolite.

And gitolite offers a way to specify config variables through gitolite configuration.

The syntax is simple:

config sectionname.keyname = value

For example:

repo gitolite
    config hooks.mailinglist = [email protected]
    config hooks.emailprefix = "[gitolite] "
    config foo.bar = ""

This does either a plain "git config section.key value" (for the first 2 examples above) or "git config --unset-all section.key" (for the last example).
Other forms of the git config command (--add, the value_regex, etc) are not supported.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文