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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steffen Prohaska
Date: Sunday, March 23, 2008 - 2:31 am

On Sun, 23 Mar 2008, Johannes Schindelin wrote:


Hmm.  I am not convinced.

Setting autocrlf for every repository limits the user's options to
override the default.  Currently we provide a global default and the
user can either override globally for all his repositories or on
a per-repository basis.  Hence, users can decide that they want autocrlf
to never happen and can easily set this in ~/.gitconfig.  If we stored
autocrlf in every newly created repository, the user would need to
override our default again and again for every new repository.

Maybe what we want is to conserve the setup that exists when a new
repository is created.  Changing autocrlf later is tricky because the
work tree's line endings depend on the settings during checkout.
Therefore, it makes sense to preserve the value of autocrlf that exists
during the first checkout.  In this regards autocrlf is different from,
for example, author because author can be easily changed later without
requiring any conversion of existing files in the work tree.

Patch follows.

Unfortunately the proposed change won't change the fact that existing
msysgit setups still break.  I still do not see an easy way to avoid
this.

            Steffen

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Store autocrlf during init-db (was [msysGit] autocrlf prob ..., Steffen Prohaska, (Sun Mar 23, 2:31 am)
[PATCH] init-db: Store current value of autocrlf, Steffen Prohaska, (Sun Mar 23, 2:34 am)
Re: Store autocrlf during init-db (was [msysGit] autocrlf ..., Johannes Schindelin, (Sun Mar 23, 4:01 am)
Re: [msysGit] Re: Store autocrlf during init-db (was [msys ..., Johannes Schindelin, (Sun Mar 23, 6:05 am)
Re: [msysGit] Re: Store autocrlf during init-db (was [msys ..., Johannes Schindelin, (Sun Mar 23, 7:07 am)
Re: [msysGit] Re: Store autocrlf during init-db (was [msys ..., Johannes Schindelin, (Sun Mar 23, 9:35 am)
Re: [msysGit] Re: Store autocrlf during init-db (was [msys ..., Johannes Schindelin, (Sun Mar 23, 4:39 pm)
Re: [msysGit] Re: Store autocrlf during init-db (was [msys ..., Johannes Schindelin, (Sun Mar 23, 5:01 pm)
Re: [PATCH] init-db: Store current value of autocrlf, Dmitry Potapov, (Sun Mar 23, 5:16 pm)
Re: [msysGit] Re: Store autocrlf during init-db (was [msys ..., Johannes Schindelin, (Mon Mar 24, 3:57 am)
[PATCH] Introduce core.initHook, Johannes Schindelin, (Mon Mar 24, 8:12 am)
Re: [PATCH] Introduce core.initHook, Junio C Hamano, (Mon Mar 24, 1:25 pm)
[PATCH v2] Introduce core.initHook, Johannes Schindelin, (Mon Mar 24, 2:40 pm)
Re: [PATCH v2] Introduce core.initHook, Junio C Hamano, (Mon Mar 24, 3:40 pm)
[PATCH v3] Introduce core.initHook, Johannes Schindelin, (Mon Mar 24, 4:21 pm)