lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT
Hi Joe,

On Mon, 19 Aug 2019 17:08:00 -0700 Joe Perches <joe@perches.com> wrote:
>
> A few examples:
>
> 1: a patch just to MAINTAINERS done via bash script:
>
> https://lore.kernel.org/lkml/904551f1f198ffac9a0f9c3c99aa966b0a7c76c1.camel@perches.com/
>
> $ git grep -h "^[FX]:" MAINTAINERS | \
> cut -f2- | grep -vP '/$|\*|\?|\[' | \
> while read file ; do \
> if [ -d $file ]; then \
> sed -i -e "s@${file}\$@${file}/@" MAINTAINERS ; \
> fi ; \
> done
>
> This one is trivial and takes almost no time.

That one seems ok (except you need "s around the $file in [ -d $file ]).
In this case, I guess the plan is that I run the script and commit the
result using the commit message and authorship from the above mail ...

(I would also replace the first three commands with

sed -En 's/^[FX]:[[:space:]]*([^[*?]*[^[*?/])$/\1/p' MAINTAINERS

/me puts away his yak razor :-))

> 2: would be Julia Lawall's stracpy change done
> with coccinelle: (attached)
>
> This one takes quite a bit longer as it has to do a
> cocci --all-includes scan of each source file and each
> of its #include files.

What do I need to apply that "patch"?

--
Cheers,
Stephen Rothwell
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-08-21 02:34    [W:0.071 / U:5.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site