Re: [dev] [sbase][RFC] patch: whitespace patches

From: v4hn <>
Date: Thu, 25 Feb 2016 13:29:07 +0100

On Thu, Feb 25, 2016 at 11:24:25AM +0000, Dimitris Papastamos wrote:
> On Wed, Feb 24, 2016 at 08:54:13PM +0100, Mattias Andrée wrote:
> > I'm thinking about introducing an extension to the standard: -w.
> > When this flag is used, patch will verify that the patchfile
> > only changes whitespace in the file.
> >
> > 1) Do you think this should be a flag or a separate tool?
> Sounds like it could be a flag.

Sounds useless to me. What counts as whitespace change?
`if(x){ \n` -> `if(x){\n`, ok,
`\tif(x){\n` -> ` if(x){\n`, in python and haskell probably not,
`if(x){\n` -> `if(x) {\n`, seems simple enough,
`printf("%d",x);\n` -> `printf("% d",x);\n`, that's no simple whitespace change,
not to talk about the infamous bumblebee patch
`rm -rf /usr /share` -> `rm -rf /usr/share`

This does not belong into standard patch.

> > 2) Should it be able to do a dry run, would be another flag
> > that can be used independently of -w?
> Yes it would be nice to support a dry run flag regardless of
> whether -w is specified or not.

gnu patch supports --dry-run. It probably makes sense
to support this flag either way.


Received on Thu Feb 25 2016 - 13:29:07 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 25 2016 - 13:36:10 CET