Subject: Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

From: Stephen Rothwell <[email-masked]>
Date: Wed, 21 Aug 2019 10:33:50 +1000

Hi Joe,

On Mon, 19 Aug 2019 17:08:00 -0700 Joe Perches <[email-masked]> wrote:
>
> A few examples:
> 
> 1: a patch just to MAINTAINERS done via bash script:
> 
> https://lore.kernel.org/lkml/[email-masked]/
> 
> $ 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