linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cleanfile: a script to clean up stealth whitespace
Date: Mon, 12 Mar 2007 22:33:04 -0700	[thread overview]
Message-ID: <45F63790.2050407@zytor.com> (raw)
In-Reply-To: <20070312221414.94977b7d.akpm@linux-foundation.org>

Andrew Morton wrote:
>> On Mon, 12 Mar 2007 12:16:30 -0700 "H. Peter Anvin" <hpa@zytor.com> wrote:
>> This 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.
> 
> 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.

Let me know if you still want it; I'll whip it up.

	-hpa

  reply	other threads:[~2007-03-13  5:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 19:16 [PATCH] cleanfile: a script to clean up stealth whitespace H. Peter Anvin
2007-03-13  6:14 ` Andrew Morton
2007-03-13  5:33   ` H. Peter Anvin [this message]
2007-03-13  5:37     ` H. Peter Anvin
2007-03-13 14:16 ` Arnaud Giersch

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=45F63790.2050407@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).