Re: [PATCH 0/3] Fix assorted white space damage

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 0/3] Fix assorted white space damage

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:10

"Marco Costalba" [off-list ref] writes:
Following there is a 3  patch series to remove stealth whitespace.

I have used the new 'cleanfile' script by H. Peter Anvin, just merged
in Linux tree.

The script cleans up various classes of stealth whitespace.  In
particular, it cleans up:

 - Whitespace (spaces or tabs)before newline;
 - DOS line endings (CR before LF);
 - Space before tab (spaces are deleted or converted to tabs);
 - Empty lines at end of file.
I haven't checked the script, but "git-apply --whitespace=strip"
can be used to do pretty much the same job with this sequence,
except the last one (do it with a copy of repository if you do
not want "git clean -x" to lose untracked):


	$ git checkout master
        $ rm -f .git/index
        $ git checkout HEAD -- t/
        $ git clean -x -d
	$ git diff -R --binary HEAD >P.diff
        $ git apply --index --whitespace=strip P.diff

Then you can check the results, and make a commit.

In the above I explicitly "saved" t/ because we have some test
vectors that need to have trailing whitespaces.

Re: [PATCH 0/3] Fix assorted white space damage

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:10

Hi,

On Sat, 12 May 2007, Junio C Hamano wrote:
In the above I explicitly "saved" t/ because we have some test vectors 
that need to have trailing whitespaces.
AFAICT the documentation has trailing whitespace also, to indicate that 
the paragraph does not end here. Correct me if I'm wrong, and these 
trailing whitespaces are not necessary.

Ciao,
Dscho

Re: [PATCH 0/3] Fix assorted white space damage

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:10

Johannes Schindelin [off-list ref] writes:
AFAICT the documentation has trailing whitespace also, to indicate that 
the paragraph does not end here. Correct me if I'm wrong, and these 
trailing whitespaces are not necessary.
Thanks for the tip --- I did not know about deliberate trailing
whitespaces there.

It should be easy to verify by comparing the build products
before and after trailing whitespace removal, so I will try to
remember doing that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help