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

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

  reply	other threads:[~2007-03-13  5:37 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
2007-03-13  5:37     ` H. Peter Anvin [this message]
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=45F6389F.5090009@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).