On Thu, 25 Feb 2010, Wolfram Sang wrote: > Hello Julia, > > your patch-series posted on kernel-janitors are always well-prepared, so I > wondered how your workflow might be. Let me assume, we start in drivers/ and > want to create one patch-file per subdirectory for some janitorial work. > > I first thought, you might use the patches coming from coccinelle directly > (piping stdout). It is just that whenever I tried the -dir option or passing > specific *.c-files to coccinelle, the resulting patch was at least missing the > 'drivers/'-prefix in the paths. Hmmm...
I start at the root of the linux source tree, not in drivers. Theer is, however, a flag -patch that I think takes an argument that is the directory with respect to which to create the strings in the diff line. > Then I wondered if you use -inplace and use git to create the proper patches. > This would also have the advantage of reusing commit-descriptions via git. I > tend to prefer this approach, although I can't anticipate how much additional > branches this creates :) Also, the .cocci_orig-files have to be removed. I never use -inplace. Some people have also mentioned that it doesn't work, although I haven't had the chance to look into it. I would rather study a patch from the beginning, to be sure it is doing the right thing. But perhaps people who are more git oriented would prefer what you suggest. > Finally, I'd like to ask how you collect the correct cc: for each patch. Is > this handwork, get_maintainers.pl or something else? get_maintainers. It's irrelevant to Coccinelle, but I use the option --git-min-signatures 50000 to only sent the patch to the maintainers, not to the recent contributers for the given files. > Looking forward to your answer, thank you in advance! > > Wolfram > > PS: I found two minor issues while trying: > > - the option '-patch' is deprecated according to the manual.pdf, so it could > be > removed from the help-texts? Hmm, I just suggested that you should use it above... I will look into its current status. > - if the parameter for '-dir' ends with a slash, the resulting patch > will miss a slash after the 'a' and 'b' prefixes, e.g for '-dir > drivers/w1/' > > diff -u -p amasters/ds2482.c bmasters/ds2482.c --- amasters/ds2482.c > 2010-02-25 08:12:13.000000000 +0100 +++ bmasters/ds2482.c 2010-02-25 > 08:12:15.000000000 +0100 OK, I will fix this as well. julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
