From: Junio C Hamano <gitster@pobox.com>
To: Philip Oakley <philipoakley@iee.email>
Cc: Elia Pinto <gitter.spiros@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 01/23] contrib/coccinnelle: add equals-null.cocci
Date: Mon, 02 May 2022 09:32:01 -0700 [thread overview]
Message-ID: <xmqqee1b28vy.fsf@gitster.g> (raw)
In-Reply-To: <13dc6ee6-f4ee-c246-b610-ec3d0a72a4ed@iee.email> (Philip Oakley's message of "Mon, 2 May 2022 11:00:48 +0100")
Philip Oakley <philipoakley@iee.email> writes:
>>> 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..
Sounds sensible. We do have some changes between 2.35 and 2.36 and
the fork-points of many topics predate 2.36 (and may even 2.35).
Here is an experiment I just did:
* Applied the patch to add equals-null.cocci to maint-2.35.
* Ran "coccicheck", applied the resulting equals-null fix and
committed the result.
* Merged the "branch B" from last night to it.
The resulting tree exactly matched "branch B" (i.e. 2.36.0 fixed
with equals-null.cocci check).
If I instead merge vanilla 2.36 with the result of fixing
maint-2.35, that differs at two places from "branch B" (i.e. we
added two new violations to 2.36 relative to 2.35).
Doing the same between maint-2.35 and maint-2.34 seems to indicate
that we didn't add any new violations during that period.
So in short, 2.35 may probably be a good place to start, but basing
on 2.36 seems to be good enough.
Thanks.
branch.c | 2 +-
compat/fsmonitor/fsm-listen-darwin.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git c/branch.c w/branch.c
index bde705b092..d0ca2b76d2 100644
--- c/branch.c
+++ w/branch.c
@@ -653,7 +653,7 @@ void create_branches_recursively(struct repository *r, const char *name,
* be created in every submodule.
*/
for (i = 0; i < submodule_entry_list.entry_nr; i++) {
- if (!submodule_entry_list.entries[i].repo) {
+ if (submodule_entry_list.entries[i].repo == NULL) {
int code = die_message(
_("submodule '%s': unable to find submodule"),
submodule_entry_list.entries[i].submodule->name);
diff --git c/compat/fsmonitor/fsm-listen-darwin.c w/compat/fsmonitor/fsm-listen-darwin.c
index dc8a33130a..0741fe834c 100644
--- c/compat/fsmonitor/fsm-listen-darwin.c
+++ w/compat/fsmonitor/fsm-listen-darwin.c
@@ -342,7 +342,7 @@ int fsm_listen__ctor(struct fsmonitor_daemon_state *state)
data->cfar_paths_to_watch,
kFSEventStreamEventIdSinceNow,
0.001, flags);
- if (!data->stream)
+ if (data->stream == NULL)
goto failed;
/*
next prev parent reply other threads:[~2022-05-02 16:32 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 4:13 [PATCH 00/23] add a new coccinelle semantic patch to enforce a Elia Pinto
2022-04-30 4:13 ` [PATCH 01/23] contrib/coccinnelle: add equals-null.cocci Elia Pinto
2022-04-30 19:34 ` Philip Oakley
2022-04-30 20:56 ` Junio C Hamano
2022-04-30 21:38 ` Philip Oakley
2022-04-30 23:13 ` Junio C Hamano
2022-05-01 0:20 ` Junio C Hamano
2022-05-01 17:04 ` Elia Pinto
2022-05-01 17:22 ` Philip Oakley
2022-05-01 23:14 ` Junio C Hamano
2022-05-01 23:37 ` Elia Pinto
2022-05-02 6:22 ` Junio C Hamano
2022-05-02 10:00 ` Philip Oakley
2022-05-02 16:32 ` Junio C Hamano [this message]
2022-05-02 11:07 ` Carlo Marcelo Arenas Belón
2022-04-30 4:13 ` [PATCH 02/23] apply.c: Fix coding style Elia Pinto
2022-04-30 4:13 ` [PATCH 03/23] archive.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 04/23] blame.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 05/23] branch.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 06/23] builtin/bisect--helper.c: " Elia Pinto
2022-05-03 9:54 ` Christian Couder
2022-04-30 4:13 ` [PATCH 07/23] builtin/checkout.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 08/23] builtin/clone.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 09/23] builtin/commit.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 10/23] builtin/diff.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 11/23] builtin/gc.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 12/23] builtin/index-pack.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 13/23] builtin/log.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 14/23] builtin/ls-remote.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 15/23] builtin/mailsplit.c: " Elia Pinto
2022-04-30 4:13 ` [PATCH 16/23] builtin/pack-redundant.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 17/23] builtin/receive-pack.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 18/23] builtin/replace.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 19/23] builtin/rev-parse.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 20/23] builtin/shortlog.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 21/23] builtin/tag.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 22/23] combine-diff.c: " Elia Pinto
2022-04-30 4:14 ` [PATCH 23/23] commit-graph.c: " Elia Pinto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqee1b28vy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitter.spiros@gmail.com \
--cc=philipoakley@iee.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).