Re: Unresolved issues
- From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
- Date
- Feb 21, 2007, 16:32 UTC
- Message-ID
- <200702211732.38268.robin.rosenberg.lists@dewire.com>
- In-Reply-To
- <Pine.LNX.4.64.0702201648000.4043@woody.linux-foundation.org>
onsdag 21 februari 2007 01:56 skrev Linus Torvalds:
Show 25 quoted lines
> > On Wed, 21 Feb 2007, Johannes Schindelin wrote: > > > > 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
The decision whether to mangel at all shoule be local. Which files to mangle, if mangle is "on", should be a per version (not like CVS' setting for all versions). Otherwise it won't be propagated properly on push/pull, and people *will* get it wrong over and over.
It it's .gitattributes or similar it can be merged as any other file and conflicts can be resolved like any other file. For efficiency you can have one .gitattributes.
Hopefully it won't happen often because autodetection is soo good, but when it get's wrong it's important that it can be fixed and distributed properly.
-- robin