4

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?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
readonly
  • 343,444
  • 107
  • 203
  • 205
  • For others (like me) who hadn't heard of it, the Gitosis site is http://eagain.net/gitweb/?p=gitosis.git , here's an article about it: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way – Pat Notz Nov 04 '08 at 19:33

2 Answers2

1

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.

0

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 = gitolite-commits@example.tld
    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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250