git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Improving CRLF error message; also, enabling autocrlf and safecrlf by default
@ 2009-02-16  2:45 Jason Spiro
  2009-02-16  3:04 ` Jeff King
  2009-02-16  3:08 ` Improving CRLF error message; also, enabling autocrlf and safecrlf " Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Jason Spiro @ 2009-02-16  2:45 UTC (permalink / raw)
  To: git

Hi,

Thanks for writing git.  It's a darn useful tool.  But one thing:

One of the pre-commit hooks detects trailing whitespace:

if (/\s$/) {
bad_line("trailing whitespace", $_);
}

Unfortunately, when I try to check in a file with DOS (CR+LF) line endings, 
this hook triggers on every line.  This happens on Cygwin.  I haven't checked, 
but I bet it happens on other platforms as well, as long as this hook runs.

But the error message "trailing whitespace" doesn't clearly tell me what's 
wrong.

1.  Could you please modify Git so that, when such a problem happens, it 
instead prints an message saying that the file has CR+LF line endings, and that 
Git does not allow this?

2.  In addition, could you please enable the core.autocrlf and core.safecrlf 
options by default in the next version of Git?

P.S.  I hereby release the contents of this e-mail message to the public 
domain.

Thanks in advance,
--
Jason Spiro: software/web developer, packager, trainer, IT consultant.
I support Linux, UNIX, Windows, and more. Contact me to discuss your needs.
+1 (416) 992-3445 / www.jspiro.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-16  3:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16  2:45 Improving CRLF error message; also, enabling autocrlf and safecrlf by default Jason Spiro
2009-02-16  3:04 ` Jeff King
2009-02-16  3:14   ` Junio C Hamano
2009-02-16  3:18     ` Jeff King
2009-02-16  3:29   ` Jason Spiro
2009-02-16  3:43     ` Improving CRLF error message; also, enabling autocrlf and?safecrlf " Jeff King
2009-02-16  3:08 ` Improving CRLF error message; also, enabling autocrlf and safecrlf " Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).