Re: Unresolved issues
- From
Nicolas Pitre <nico@cam.org>
- Date
- Feb 21, 2007, 01:51 UTC
- Message-ID
- <alpine.LRH.0.82.0702202003370.31945@xanadu.home>
- In-Reply-To
- <Pine.LNX.4.64.0702201648000.4043@woody.linux-foundation.org>
On Tue, 20 Feb 2007, Linus Torvalds wrote:
Show 16 quoted lines
> > > 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
I think this is not generic enough. For one thing this should not be used for crlf only. There is also the binary patch generation code that wants to know if a file is binary or not.
What about:
[filetype "text"] match=*.[ch] attribute=text crlfmangle=true
[filetype "images"] match=*.jpg attribute=binary merge=special_jpg_merger
etc.
Nicolas