Re: [RFR] gitattributes(5) documentation
- From
Junio C Hamano <junkio@cox.net>
- Date
- Apr 22, 2007, 07:02 UTC
- Message-ID
- <7vmz10q4cx.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0704211749300.5655@qynat.qvtvafvgr.pbz>
David Lang <david.lang@digitalinsight.com> writes:
> in the long run this would let you phase out the core.autocrlf option > entirely, letting the bahavior be specified in gitattributes.
You _could_, but that is quite against what we want. These should stay separate, and the gitattributes mechanism is designed specifically to allow them cleanly separated.
The configuration "core.autcrlf" describes a particular repository. If the platform the repository is on expects text files to be line-terminated with CRLF, you would have core.autocrlf set; otherwise you don't.
On the other hand, gitattributes' 'crlf' describes if the path is text, and that is the reason it can and should be "in-tree", i.e. not just $GIT_DIR/info/attributes (which is private to the repository) but in .gitattributes (and subdirectories'), which is given to everybody who has a copy of the project.
How text files are handled is a local matter, and stays in the config. Which ones are text is the same for everybody who has a copy of the project, and is in-tree information.