git: Tralining whitespace error during commit

Matt Seitz (matseitz) matseitz@cisco.com
Thu Aug 9 17:08:00 GMT 2007


When I run "git commit" to check in changes to my
"/cygdrive/c/windows/system32/drivers/etc/hosts" file, I receive the
following error messages like the following (Note:  I've changed the
host name and IP addresses to protect its identity):

"matseitz@matseitz-wxp02 /cygdrive/c/windows/system32/drivers/etc
$ git commit
*
* You have some suspicious patch lines:
*
* In hosts
* trailing whitespace (line 20)
hosts:20:10.10.10.10 host1.example.com

matseitz@matseitz-wxp02 /cygdrive/c/windows/system32/drivers/etc
$"

I found one suggested fix at
"http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-s
uspicious-patch-lines/":

"To solve the problem, you need to edit .git/hooks/pre-commit and
comment out the following lines:

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

Is this the best solution?







--
Matt Seitz
Manager, File System Virtualization
Cisco Systems, Inc.
.:|:.:|:. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 12181 bytes
Desc: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070809/21f5f01a/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list