Re: Unresolved issues
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 21, 2007, 00:56 UTC
- Message-ID
- <Pine.LNX.4.64.0702201648000.4043@woody.linux-foundation.org>
- In-Reply-To
- <Pine.LNX.4.63.0702210136050.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Wed, 21 Feb 2007, Johannes Schindelin wrote:
Show 11 quoted lines
> > Um, I don't want to spoil the party, but was not the original idea of this > auto-CRLF thing some sort of "emulation" of the CVS text checkout > behaviour? > > In that case, .gitattributes (I mean a tracked one) would be wrong, wrong, > wrong. > > It's a local setup if you want auto-CRLF or not. So, why not just make it > a local setting (if in config or $GIT_DIR/info/gitattributes, I don't > care) which shell patterns are to be transformed on input and/or output?
That is a good point. We *could* just make it a ".git/config" issue, which has the nice benefit that you can just set up some user-wide rules rather than making it be per-repo.
Of course, the config language may not be wonderful for this. But we could certainly have something like
[format "crlf"] enable = true text = *.[ch] binary = *.jpg
which would just override the built-in rules (where anything that doesn't match is just "auto-content"). And make the default built-in ones be good enough that in _practice_ you never even need this in the first place.
Linus