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

Re: [PATCH 01/23] contrib/coccinnelle: add equals-null.cocci

From
Philip Oakley <philipoakley@iee.email>
Date
May 2, 2022, 10:00 UTC
Message-ID
<13dc6ee6-f4ee-c246-b610-ec3d0a72a4ed@iee.email>
In-Reply-To
<xmqqmtg01mir.fsf@gitster.g>
On 02/05/2022 07:22, Junio C Hamano wrote:
Show 43 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> To avoid unnecessary conflicts with in-flight topics, ideally, we
>> perhaps could do something along this line:
>>
>>  * Pick a recent stable point that is an ancestor of all topics in
>>    flight.  Add the new coccinelle rule file, take "make coccicheck"
>>    output and create a two-patch series like Philip suggested.  Queue
>>    the result in a topic branch B.
>>
>>  * For each topic in flight T, make a trial merge of T into B, and
>>    examine "make coccicheck" output.  Any new breakages such a test
>>    finds are new violations the topic T introduces.  Discard the
>>    result of the trial merge, and add one commit to topic T that
>>    corrects the violations the topic introduced, and send that fixup
>>    to the author of the topic for consideration when the topic is
>>    rerolled (or if the topic is in 'next', acked to be queued on
>>    top).  Do not fix the violations that is corrected when branch B
>>    was prepared above.
>>
>> As I assumed that applying the patches in this series would create
>> the branch B, and then I saw that the tip of 'seen' after merging
>> this topic still needed to have a lot more fixes according to "make
>> coccicheck", I got a (false) impression that there are too many new
>> violations from topics in flight, which was the primary source of my
>> negative reaction against potential code churn.  If we try the above
>> exercise, perhaps there may not be too many topics that need fix-up
>> beyond what we fix in the branch B, and if that is the case, I would
>> not be so negative.
> So I tried that myself, and the topic branch B was fairly
> straightforward to create.
>
> We have ~60 topics in flight (not counting this one), and it turns
> out that there is no topic that introduces new code that fails the
> equals-null.cocci rule.  IOW, the follow-up fixup per topic turns
> out to be an empty set.
>
> So, I'd probably use the [01/23] and then a single ~5k lines patch
> that was generated with equals-null.cocci rule as the branch B
> above, let it percolate down from 'seen' to 'next' to eventually
> 'master'.
>
> Thanks.
That sounds like a good result.

It may also be worth Elia cross checking against a previous release (v2.35.0?) for relatively recent introductions, to cover the potential revert scenario, just in case..

Philip
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 38 in “add a new coccinelle semantic patch to enforce a”
  1. 00/23 add a new coccinelle semantic patch to enforce aElia Pinto, Apr 30, 2022
  2. 01/23 contrib/coccinnelle: add equals-null.cocciElia Pinto, Apr 30, 2022
  3. Philip OakleyApr 30, 2022
  4. Junio C HamanoApr 30, 2022
  5. Philip OakleyApr 30, 2022
  6. Junio C HamanoApr 30, 2022
  7. Junio C HamanoMay 1, 2022
  8. Elia PintoMay 1, 2022
  9. Philip OakleyMay 1, 2022
  10. Junio C HamanoMay 1, 2022
  11. Elia PintoMay 1, 2022
  12. Junio C HamanoMay 2, 2022
  13. Philip OakleyMay 2, 2022
  14. Junio C HamanoMay 2, 2022
  15. Carlo Marcelo Arenas BelónMay 2, 2022
  16. 02/23 apply.c: Fix coding styleElia Pinto, Apr 30, 2022
  17. 03/23 archive.c: Fix coding styleElia Pinto, Apr 30, 2022
  18. 04/23 blame.c: Fix coding styleElia Pinto, Apr 30, 2022
  19. 05/23 branch.c: Fix coding styleElia Pinto, Apr 30, 2022
  20. 08/23 builtin/clone.c: Fix coding styleElia Pinto, Apr 30, 2022
  21. 07/23 builtin/checkout.c: Fix coding styleElia Pinto, Apr 30, 2022
  22. 06/23 builtin/bisect--helper.c: Fix coding styleElia Pinto, Apr 30, 2022
  23. Christian CouderMay 3, 2022
  24. 09/23 builtin/commit.c: Fix coding styleElia Pinto, Apr 30, 2022
  25. 11/23 builtin/gc.c: Fix coding styleElia Pinto, Apr 30, 2022
  26. 10/23 builtin/diff.c: Fix coding styleElia Pinto, Apr 30, 2022
  27. 12/23 builtin/index-pack.c: Fix coding styleElia Pinto, Apr 30, 2022
  28. 13/23 builtin/log.c: Fix coding styleElia Pinto, Apr 30, 2022
  29. 14/23 builtin/ls-remote.c: Fix coding styleElia Pinto, Apr 30, 2022
  30. 16/23 builtin/pack-redundant.c: Fix coding styleElia Pinto, Apr 30, 2022
  31. 15/23 builtin/mailsplit.c: Fix coding styleElia Pinto, Apr 30, 2022
  32. 18/23 builtin/replace.c: Fix coding styleElia Pinto, Apr 30, 2022
  33. 20/23 builtin/shortlog.c: Fix coding styleElia Pinto, Apr 30, 2022
  34. 19/23 builtin/rev-parse.c: Fix coding styleElia Pinto, Apr 30, 2022
  35. 17/23 builtin/receive-pack.c: Fix coding styleElia Pinto, Apr 30, 2022
  36. 21/23 builtin/tag.c: Fix coding styleElia Pinto, Apr 30, 2022
  37. 23/23 commit-graph.c: Fix coding styleElia Pinto, Apr 30, 2022
  38. 22/23 combine-diff.c: Fix coding styleElia Pinto, Apr 30, 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.