From: "Jeremy M. Dolan" <jmd@foozle.turbogeek.org>
To: linux-kernel@vger.kernel.org
Subject: Extraneous whitespace removal?
Date: Mon, 8 Jan 2001 04:42:18 -0600 [thread overview]
Message-ID: <20010108044218.A9610@foozle.turbogeek.org> (raw)
Well, I'll let the number speak:
$ cp -R linux-2.4.0 linux-2.4.0-trimed
$ find linux-2.4.0-trimed -type f | xargs perl -wi -pe 's/\s+$/\n/'
$ du -s linux-2.4.0 linux-2.4.0-trimed
119360 linux-2.4.0 # NOTE: 4k blocks, just an estimate
119160 linux-2.4.0-trimed
$ diff -ru linux-2.4.0 linux-2.4.0-trimed > trimed.diff
$ ls -l trimed.diff*
-rw-r--r-- 1 jmd users 19131225 Jan 8 01:49 trimed.diff
-rw-r--r-- 1 jmd users 4732306 Jan 8 01:50 trimed.diff.gz
-rw-r--r-- 1 jmd users 3819235 Jan 8 01:52 trimed.diff.bz2
Pluses:
- clean up messy whitespace
- cut precious picoseconds off compile time
- cut kernel tree by 200k (+/- alot)
Minuses:
- adds 3.8M bzip2 or 4.7M gzip to next diff
Notes:
- Don't actually use the above perl s// command. Instead, use
[<tab><space>] in place of the \s. The problem with \s is it
includes page breaks. I only included this one since the one with
tab isn't cut&paste-able.
- I'm not yet positive there are no other places in the tree that
aren't safe to s/[<tab><space>]+$//. C can, if formated poorly
enough, be affected by it (multiline strings not ending with \).
Can anyone very familiar with Makefile/DocBook/TeX/asm syntax
comment if they could also be potentially affected?
- Another place to save space is extraneous \n's before EOF. I think
that saves an aditional 15k or so, based on rough estimates with
grep.
- Yes, I am pretty pedantic to propose a 19M patch that doesn't *DO*
anything.
--
Jeremy M. Dolan <jmd@turbogeek.org>
OpenPGP key = http://turbogeek.org/openpgp-key
OpenPGP fingerprint = 494C 7A6E 19FB 026A 1F52 E0D5 5C5D 6228 DC43 3DEE
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2001-01-08 10:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-08 10:42 Jeremy M. Dolan [this message]
2001-01-08 11:29 ` David Weinehall
2001-01-08 11:50 ` Thomas Pornin
2001-01-09 0:24 ` Rusty Russell
2001-11-29 14:40 Wayne Scott
2001-11-29 16:02 ` Padraig Brady
2001-11-30 13:16 ` M. R. Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010108044218.A9610@foozle.turbogeek.org \
--to=jmd@foozle.turbogeek.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®