On Tue, Jan 08, 2008 at 01:31:57PM -0800, Linus Torvalds wrote:But my idea was about checking for "naked" LF, because if there is at least one naked LF, then you will get a _different_ file than you put into the repository. It seems the check for named LF should be: if (safecrlf && stats.lf == stats.crlf) Unfortunately, you cannot return 0 here, because if there is no CRLF, the opposite conversation cannot tell apart when all CRLF were successfully converted to LF, and when there was no conversation at all. So, the only thing to do here is to die() saying this file should be either marked as binary or EOL in the text must be corrected. I agree that in most cases, you *do* want to covert, but the idea of the "safe" mode is to protect you from the possibility (whatever small it is) when you do not want to convert, because it is a _binary_ file, but is_binary heuristic was wrong. The idea of "autocrlf=safe" is always to be on the safe side. Those who prefer automatic correction of EOL can use "autocrlf=true". Besides, checking EOL is somewhat similar checking whitespaces. Git allows you either have --whitespace=error or --whitespace=strip, so it is reasonable to have the same choice about EOL. I may choose either the "safe" mode, which will only error out, or I can have the "true" mode, which corrects EOLs on-fly. 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
| Andrew Morton | Re: 2.6.24-rc6-mm1 |
| Glauber de Oliveira Costa | [PATCH 8/19] modify write_ldt function |
| Steven Rostedt | Re: Major regression on hackbench with SLUB |
| Satyam Sharma | Re: 2.6.23-rc4-mm1 |
git: | |
| Chris Ortman | [FEATURE REQUEST] git-svn format-patch |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Scott Chacon | Git Community Book |
| Catalin Marinas | Re: [ANNOUNCE] pg - A patch porcelain for GIT |
| Richard Stallman | Real men don't attack straw men |
| frantisek holop | nptd regression in 4.2 |
| Kevin | uvm_mapent_alloc: out of static map entries on 4.3 i386 |
| Vim Visual | GRAPE cluster supercomputer + OpenBSD |
| John Stoffel | Re: [PATCH] LogFS take three |
| hooanon05 | [PATCH 62/67] aufs magic sysrq handler |
| Chris Mason | Re: [PATCH][RFC] fast file mapping for loop |
| Chris Mason | Re: [ANNOUNCE] Btrfs v0.12 released |
