Setting per-repository configuration for git
- From
- Jeremy Rosen <jeremy.rosen@openwide.fr>
- Date
- Oct 25, 2013, 07:12 UTC
- Message-ID
- <834511791.9670586.1382685155770.JavaMail.root@openwide.fr>
- In-Reply-To
- <884520645.9668515.1382684531443.JavaMail.root@openwide.fr>
Hello everybody
I am looking into the git configuration mechanism and there seem to be a "hole" in use cases I'm trying to figure out...
git configurations can be saved at various places
* /etc/gitconfig : system-wide configuration * ~/.gitconfig : user-wide configuration * .git/config : repository-wide configuration
however I can't find a way to have the repository's configuration saved and transmited with the repository in a way similar to how .gitignore is transmitted...
Saving some configuration information within a repository is not unknown in git. .gitignore does it, and submodule configuration does it to.
I think it's important to have a way to have configuration options be saved in a repository (and overridable with .git/config which is local-repository only) because a lot of configurationoptions are meant to express repository policies (triangular workflows, merge vs rebase, mail vs push) and it would make sense to have them transmitted that way.
Knowing how mature git is I can only assume that this has already been discussed and that there is a good reason not to do it. Is it because of hooks ? would it break something I don't see in git ?
git (the project) shouldn't enforce policies on repositories, but I think it makes sense for repositories to have a way to set default policies on their clone...
Thx
Cordialement
Jérémy Rosen +33 (0)1 42 68 28 04
fight key loggers : write some perl using vim
Open Wide Ingenierie
23, rue Daviel 75012 Paris - France www.openwide.fr