From: Jason Spiro <jasonspiro4@gmail.com>
To: git@vger.kernel.org
Subject: Improving CRLF error message; also, enabling autocrlf and safecrlf by default
Date: Mon, 16 Feb 2009 02:45:43 +0000 (UTC) [thread overview]
Message-ID: <loom.20090216T022524-78@post.gmane.org> (raw)
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
next reply other threads:[~2009-02-16 2:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 2:45 Jason Spiro [this message]
2009-02-16 3:04 ` Improving CRLF error message; also, enabling autocrlf and safecrlf by default 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20090216T022524-78@post.gmane.org \
--to=jasonspiro4@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.