threads / discuss / 10116

trailing whitespace problem

Subject: trailing whitespace problem

## tl;dr

2 messages between Oct 2, 2007 and Oct 2, 2007.

replies: 1people: 2as markdown or json

lode leroy· Oct 2, 2007, 12:07 UTC · lore
when I use git commit -a, I get the following message:
*
* You have some suspicious patch lines:
*
* In src/test.c
* trailing whitespace (line 60)
src/test.c:60: }

when I fix the whitespace problem, and do "git commit -a" again, I still get the same message.

Only after adding the file again, with "git add src/test.c", I can commit my changes.

git version 1.5.3.2 (on cygwin)
ps: not related to CR/LF...
Junio C Hamano· Oct 2, 2007, 18:54 UTC · re: lode leroy · lore

Re: trailing whitespace problem

"lode leroy" <lode.leroy@gmail.com> writes:
Show 14 quoted lines
> when I use git commit -a, I get the following message:
>
> *
> * You have some suspicious patch lines:
> *
> * In src/test.c
> * trailing whitespace (line 60)
> src/test.c:60: }
>
> when I fix the whitespace problem,  and do "git commit -a" again,
> I still get the same message.
>
> Only after adding the file again, with "git add src/test.c",
> I can commit my changes.
Interesting.  Are you doing anything unusual, like "assume unchanged"?
> git version 1.5.3.2 (on cygwin)
>
> ps: not related to CR/LF...

← back to recent threads