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

Re: mingw, windows, crlf/lf, and git

From: David Lang <hidden>
Date: 2016-06-15 22:42:54

On Mon, 12 Feb 2007, Shawn O. Pearce wrote:
Johannes Schindelin [off-list ref] wrote:
quoted
On Mon, 12 Feb 2007, Mark Levedahl wrote:
quoted
Perhaps I'm too paranoid, but I've been burnt way too many times by
text/binary mode stuff to let this part be trivialized. Maybe it only
gets enabled by core.ImReallyParanoid, but I want that option.
Be aware that what you proposed costs many CPU cycles. I am totally
opposed to enabling that option by default on all platforms. I am okay
with .gitattributes (but I would call it .gitfiletypes), but I am _not_
okay with git being _too much_ fscked up by Windows. Microsoft has done
enough harm already.
Indeed; this type of checking should only occur if there is a filter
applied to a file.  Most files in most projects would hopefully
just be considered to be byte streams to Git, like they are today,
and thus not incur any additional overhead, beyond matching their
type to determine they are in fact just a byte stream.

The type could be cached in the index; or at least a single bit
which says "I'm just a byte stream, thanks" so that the matching
only needs to occur during an initial read-tree.
for the limited case of line endings it may be reasonable to define the internal 
git format to be lf, and if you are running on a platform that uses this nativly 
no transition is needed

one possible way to make this be a general feture is to have the helper script 
have a --needed flag that tells git if it would do anything on the current 
platform or not. this way you don't need to run it (and sanity check it) if it's 
not needed.

David Lang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help