On Fri, Feb 9, 2018 at 2:09 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Stefan Beller <sbeller@xxxxxxxxxx> writes: > >> Patch generated by >> >> 2. Applying the semantic patch contrib/coccinelle/packed_git.cocci >> to adjust callers. > > About this part... > >> diff --git a/contrib/coccinelle/packed_git.cocci b/contrib/coccinelle/packed_git.cocci >> new file mode 100644 >> index 0000000000..da317a51a9 >> --- /dev/null >> +++ b/contrib/coccinelle/packed_git.cocci >> @@ -0,0 +1,7 @@ >> +@@ @@ >> +- packed_git >> ++ the_repository->objects.packed_git >> + >> +@@ @@ >> +- packed_git_mru >> ++ the_repository->objects.packed_git_mru > > The above is correct for one-time transition turning pre-transition > code to post the_repository world, but I am not sure if we want to > have it in contrib/coccinelle/, where "make coccicheck" looks at, as > a way to continuously keep an eye on "style" violations like using > strbuf_addf() for a constant when strbuf_addstr() suffices. > > Wouldn't we need a mechanism to ensure that this file will *not* be > used in "make coccicheck" somehow? > I can omit the cocci files from the patches, if that is better for maintenance. I thought it may be a helpful for merging this series with the rest of the evolved code base which may make use of one of the converted functions. So instead of fixing that new instance manually, cocinelle could do that instead. Stefan