lkml.org 
[lkml]   [2007]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cleanfile: a script to clean up stealth whitespace
H. Peter Anvin wrote:
>>
>> Fair enough.
>>
>> It'd be nice to have a clean-up-a-patch version of this. So it does
>> all these things, except it only changes lines which start with ^+.
>
> It can do everything except kill empty lines at the end of the file; a
> patch simply doesn't contain enough information to know if blank lines
> are inserted at the end of a file as opposed in the middle of the file.
>
> It can, of course, be done if the unpatched material is available,
> probably by applying the patch and seeing what happens.
>

Correction: for a context/unified diff it can be done by observing that
there is no context left at the end of the file. It won't work if the
file already have empty space at the end of it, but that's probably good
enough. I'll cook something up.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-13 06:41    [W:0.034 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site