Removing the whitespaces??? [Was: Re: Why not "attach" patches?]

Henning P. Schmiedehausen (hps@intermeta.de)
Wed, 16 Jan 2002 00:11:35 +0000 (UTC)


Andreas Dilger <adilger@turbolabs.com> writes:

>Well, it would be a feature if it knew enough to only remove whitespace
>at the end of "+" lines in context diffs. Then we wouldn't have 200kB
>of useless whitespace in the kernel sources.

apply patches. Run this. Rinse. Repeat. :-)

--- cut ---

mkdir /usr/src/linux.noblanks

(
cd /usr/src/linux
find . -type d -exec mkdir -p /usr/src/linux.noblanks/{} \;
for i in `find . -type f`; do
perl -ne 's/[ ]+$//; print;' < ${i} > /usr/src/linux.noblanks/${i}
done
)

diff -ur /usr/src/linux /usr/src/linux.noblanks | mail -s "blanks removed" torvalds@transmeta.com

rm -rf /usr/src/linux.noblanks
--- cut ---

(This is a TAB and a space in the square brackets above.
Don't use \s. Trust me.)

linux-2.2.20.tar.bz2: 15,751,285 bytes
linux-2.2.20-nbl.tar.bz2: 15,608,085 bytes

Patch Size (uncompressed): 17,815,166 bytes (yes this _is_ 17,4 MBytes)
(compressed, bzip2): 3,322,456 bytes

One mega-patch to shear off about 140 KBytes from the compressed (and
about 170 k from the unpacked (94488 vs. 94316 KBytes ) kernel source
would (while it may be the biggest single "reduce-size-of-kernel-tree
patch" in years :-) ) a little gross.

Regards
Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de D-91054 Buckenhof Fax.: 09131 / 50654-20 - 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/