Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [RFR] gitattributes(5) documentation

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:06

David Lang [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help