Re: [PATCH 15/17] cocci: apply the "revision.h" part of "the_repository.pending"
- From
Glen Choo <chooglen@google.com>
- Date
- Mar 22, 2023, 23:38 UTC
- Message-ID
- <kl6l8rfoe4qr.fsf@chooglen-macbookpro.roam.corp.google.com>
- In-Reply-To
- <patch-15.17-c8ff241844a-20230317T152725Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 9 quoted lines
> diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci > deleted file mode 100644 > index 1190a3312bd..00000000000 > --- a/contrib/coccinelle/the_repository.pending.cocci > +++ /dev/null > @@ -1,14 +0,0 @@ > -// This file is used for the ongoing refactoring of > -// bringing the index or repository struct in all of > -// our code base.
Now that we've deleted this file, I wanted to get a sense of where this series lands us in the the_repository migration. ISTR that we'd consider ourselves "done" when we stop referencing "the_repository" in non-builtins, so presumably we aren't there yet ;)
Inspecting all of the ".h" files, we can see that the only remaining function/macro of this sort is "the_hash_algo". Because you expanded the search to cover cases not in "NO_THE_REPOSITORY_COMPATIBILITY_MACROS", you've actually achieved more than what your CL says. Hooray!
We can't go so far as to say that we've removed all implicit references to "the_repository", though, since we still have functions that reference "the_repository" in their implementations. But, I don't think this ".cocci" file would help us with those cases anyway, since this was targeted specifically at functions/macros that were passing "the_repository" to functions that accepted a "struct repository" arg.
Thanks for the cleanup, this is great!