git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 00/12] tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROS

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Nov 18, 2022, 12:13 UTC
Message-ID
<51e91e8f-f11c-be8c-a23d-566eb3fbb387@dunelm.org.uk>
In-Reply-To
<cover-00.12-00000000000-20221118T112205Z-avarab@gmail.com>
Hi Ævar
On 18/11/2022 11:30, Ævar Arnfjörð Bjarmason wrote:
> As 3/12 here notes we've been undergoing a sloooow migration away from
> functions that provide "the_index" for you since 2007, with the last
> major move away from some of them being in 2019.

The commit cited in 3/12 actually introduced most of these macros. What it did was remove the dependency on `the_index` from cache.c. Maybe I'm missing some context but I struggling to see the benefit in removing the macros with out removing the dependency on `the_index`. Doing that would require much more manual work as it cannot be automated with coccinelle but it would provide a tangible benefit which I don't see here.

Best Wishes
Phillip
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 19 of 32 in “tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROS”
  1. 00/12 tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROSÆvar Arnfjörð Bjarmason, Nov 18, 2022
  2. 01/12 cache.h: remove unused "the_index" compat macrosÆvar Arnfjörð Bjarmason, Nov 18, 2022
  3. 02/12 builtin/{grep,log}.: don't define "USE_THE_INDEX_COMPATIBILITY_MACROS"Ævar Arnfjörð Bjarmason, Nov 18, 2022
  4. 03/12 cocci & cache.h: remove rarely used "the_index" compat macrosÆvar Arnfjörð Bjarmason, Nov 18, 2022
  5. 04/12 read-cache API & users: make discard_index() return voidÆvar Arnfjörð Bjarmason, Nov 18, 2022
  6. 05/12 cocci: add a index-compatibility.pending.cocciÆvar Arnfjörð Bjarmason, Nov 18, 2022
  7. 06/12 cocci & cache.h: apply a selection of "pending" index-compatibilityÆvar Arnfjörð Bjarmason, Nov 18, 2022
  8. 07/12 cocci & cache.h: apply variable section of "pending" index-compatibilityÆvar Arnfjörð Bjarmason, Nov 18, 2022
  9. 08/12 cocci: apply "pending" index-compatibility to "t/helper/*.c"Ævar Arnfjörð Bjarmason, Nov 18, 2022
  10. 09/12 {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"Ævar Arnfjörð Bjarmason, Nov 18, 2022
  11. Taylor BlauNov 18, 2022
  12. 10/12 cache.h & test-tool.h: add & use "USE_THE_INDEX_VARIABLE"Ævar Arnfjörð Bjarmason, Nov 18, 2022
  13. Taylor BlauNov 18, 2022
  14. 12/12 builtin/*: remove or amend "USE_THE_INDEX_COMPATIBILITY_MACROS"Ævar Arnfjörð Bjarmason, Nov 18, 2022
  15. Taylor BlauNov 18, 2022
  16. Ævar Arnfjörð BjarmasonNov 18, 2022
  17. Taylor BlauNov 18, 2022
  18. 11/12 cocci: apply "pending" index-compatibility to some "builtin/*.c"Ævar Arnfjörð Bjarmason, Nov 18, 2022
  19. Phillip WoodNov 18, 2022
  20. Ævar Arnfjörð BjarmasonNov 18, 2022
  21. 00/11 tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROSÆvar Arnfjörð Bjarmason, Nov 19, 2022
  22. 01/11 cache.h: remove unused "the_index" compat macrosÆvar Arnfjörð Bjarmason, Nov 19, 2022
  23. 02/11 builtin/{grep,log}.: don't define "USE_THE_INDEX_COMPATIBILITY_MACROS"Ævar Arnfjörð Bjarmason, Nov 19, 2022
  24. 03/11 cocci & cache.h: remove rarely used "the_index" compat macrosÆvar Arnfjörð Bjarmason, Nov 19, 2022
  25. 04/11 read-cache API & users: make discard_index() return voidÆvar Arnfjörð Bjarmason, Nov 19, 2022
  26. 05/11 cocci: add a index-compatibility.pending.cocciÆvar Arnfjörð Bjarmason, Nov 19, 2022
  27. 06/11 cocci & cache.h: apply a selection of "pending" index-compatibilityÆvar Arnfjörð Bjarmason, Nov 19, 2022
  28. 08/11 cocci: apply "pending" index-compatibility to "t/helper/*.c"Ævar Arnfjörð Bjarmason, Nov 19, 2022
  29. 07/11 cocci & cache.h: apply variable section of "pending" index-compatibilityÆvar Arnfjörð Bjarmason, Nov 19, 2022
  30. 09/11 {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"Ævar Arnfjörð Bjarmason, Nov 19, 2022
  31. 10/11 cache.h & test-tool.h: add & use "USE_THE_INDEX_VARIABLE"Ævar Arnfjörð Bjarmason, Nov 19, 2022
  32. 11/11 cocci: apply "pending" index-compatibility to some "builtin/*.c"Ævar Arnfjörð Bjarmason, Nov 19, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.