This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

git: Tralining whitespace error during commit


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.
.:|:.:|:. 

Attachment: cygcheck.out
Description: cygcheck.out

--
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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]