On Sun, Mar 23, 2008 at 02:42:16PM +0100, Steffen Prohaska wrote:
> 
> We have two conflicting objectives and I do not know how to meet them
> the same time:
> 
>  1) Existing setups should not break.
> 
>  2) Users should have a way to set a global default for autocrlf that
>     overrides our defaults.
> 
> If we store the new default in newly created repositories, (1) would be
> met but (2) is not possible.  If we support ~/.gitconfig for overriding
> the system-wide default, (2) is trivial but (1) is hard to meet.


To meet both requirements you have to copy autocrlf setting for each new
repository during git init or clone and should never use the global
value for any other purpose than this.

This means that you do NOT really need the system or global default for
autocrlf in the sense we have it for other configuration variables, but
you need a template value for it.

We already have templates for different hooks, info/exclude, etc. So,
instead of placing autocrlf in /etc/gitconfig, you should place this
variable to /usr/share/git/templates/config and this file should be
copied by git init or git clone as any other file in templates.


Dmitry

Reply via email to