On Tue, Jan 08, 2008 at 07:58:57PM +0100, Steffen Prohaska wrote:Maybe I am wrong but it seems to me that to guarantee that CRLF conversion is reversible (which means that you can always get exactly what you put into the repository), it is enough to check that the conversation is performed only if every LF is preceded by CR. If it is not so, error out and tell the user that the file should be either marked as binary or EOL in the text must be corrected. So, even in those rare cases where the heuristic went wrong, you will not lose your data. Most likely you will get the above error, but even if a binary file is checked in as text, it will affect only cross-platform projects, and it will be easily to correct the situation later by marking this file as binary and checking in again. So, it is a extermely rare event, and no data is lost. Perhaps, this option can be called core.autocrlf=safe IMHO, a _text_ file is not just some octets, it consists of lines. Even without CRLF conversation, Git is aware about to do some basic operations like diff and merge. So, it is natural to store lines in the repository in the same EOL marker regardless on what platform the file is created. So, having core.autocrlf=false on Windows is wrong. You may not notice it until you do not move to another platform, but the whole thing is already broken. It is not about one platform being more native than other. It is like in the C standard, LF is used to denote the end of line, because it is the only sane choice to mark it. Dmitry - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Ondrej Zary | pata_it821x completely broken |
| Jeremy Fitzhardinge | [PATCH 02 of 36] x86: add memory clobber to save/loadsegment |
| Thomas Renninger | AMD Mobile Semprons (3500+, 3600+,...) break with nohz and highres enabled |
git: | |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Jakub Narebski | Octopus merge: unique (?) to git, but is it useful? |
| Junio C Hamano | [ANNOUNCE] GIT 1.5.3-rc4 |
| Theodore Tso | Re: git on MacOSX and files with decomposed utf-8 file names |
| qw er | OpenBSD sucks |
| Richard Stallman | Real men don't attack straw men |
| Henning Brauer | Re: About Xen: maybe a reiterative question but .. |
| Kevin Neff | Patching a SSH 'Weakness' |
| David Miller | [GIT]: Networking |
| Steve Wise | pktgen question |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Waskiewicz Jr, Peter P | RE: [PATCH 2/3][NET_BATCH] net core use batching |
