Thread (19 messages) flat view 19 messages, 3 authors, 2016-06-15

Re: Store autocrlf during init-db (was [msysGit] autocrlf problems with Git-preview20080301.exe)

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:44:25

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help