Re: [PATCH 003/194] object-store: move packed_git and packed_git_mru to object store
- From
René Scharfe <l.s.r@web.de>
- Date
- Feb 12, 2018, 21:40 UTC
- Message-ID
- <adb2500e-d95d-bbaa-aa22-ee10d9613401@web.de>
- In-Reply-To
- <CAGZ79kacD5Bevw==v3fbyWmz0FiDDM5ypkYuxHxbXJM62FX40w@mail.gmail.com>
[removed rene.scharfe@lsrfire.ath.cx from cc:; I lost that domain a few years ago. Thanks for the heads-up, Stefan!]
Am 12.02.2018 um 20:00 schrieb Stefan Beller:
Show 32 quoted lines
> On Fri, Feb 9, 2018 at 2:09 PM, Junio C Hamano <gitster@pobox.com> wrote: >> Stefan Beller <sbeller@google.com> 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?
object_id.cocci is similar in this regard -- once the conversion is done, we won't need it anymore.
Show 6 quoted lines
> 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.
Right, merging should be easier -- instead of fixing conflicts manually, Coccinelle could regenerate the patch.
René