All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Elia Pinto <gitter.spiros@gmail.com>, Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 01/23] contrib/coccinnelle: add equals-null.cocci
Date: Sun, 1 May 2022 18:22:07 +0100	[thread overview]
Message-ID: <d996dc46-ae9a-6506-8043-0ac5468d9dd4@iee.email> (raw)
In-Reply-To: <CA+EOSBnx3-G02=zXGUrRuKPTDPBSYoBY=rERCORe8NtywEOiGg@mail.gmail.com>

On 01/05/2022 18:04, Elia Pinto wrote:
> Il giorno dom 1 mag 2022 alle ore 02:20 Junio C Hamano
> <gitster@pobox.com> ha scritto:
>> What I found curious is that the result of applying these patches to
>> v2.36.0 and running coccicheck reveals that we are not making the
>> codebase clean wrt this new coccinelle rule.
>>
> It is possible, I did not use coccicheck to apply the semantic patch
> (on next)  but i use a my script which I think is slightly more
> efficient but perhaps it is not so correct. Anyway, given the
> discussion that has taken place so far, what do you think is best for
> me to do? Do a reroll (perhaps with only 2 patches in total ) or wait
> for the "right" moment in the future as foreseen by the Documentation
> and dedicate the time to more useful contributions for git? Thank you
> all for the review
>
Hi Elia,

Given Junio's comment regarding the potential for patch churn, it may,
as an alternative, be possible to create a script that will
check/extract just those those changes that are either:

A) mistakes in patches between say master and seen `master..seen` so
that they aren't incorporated, though `next..seen` may be more appropriate.

B) detect 'while you are at it' fixes that could be applied to a file
that is being modified with the same range query. The file fix-up patch
could/would then be inserted as preparatory step to the relevant series
(i.e. fed to the series author), allowing easy reversion with/without
the fix-up.

C) suggest to coccinelle that maybe they include a similar Git based
range check option, to avoid needing a fancy script [using Junio's
rationale].

D) more clearly identify _why_ the particular instances that are
corrected are _worth_ changing now (e.g. fixing _one_ may be a worthy
GSOC or Outreachy activity, or .. <insert own reasons>).

 Hope that helps.

Philip

>> diff -u -p a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c
>> --- a/compat/fsmonitor/fsm-listen-darwin.c
>> +++ b/compat/fsmonitor/fsm-listen-darwin.c
>> @@ -342,7 +342,7 @@ int fsm_listen__ctor(struct fsmonitor_da
>>                                            data->cfar_paths_to_watch,
>>                                            kFSEventStreamEventIdSinceNow,
>>                                            0.001, flags);
>> -       if (data->stream == NULL)
>> +       if (!data->stream)
>>                 goto failed;
[snipped]

  reply	other threads:[~2022-05-01 17:22 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 [this message]
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
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=d996dc46-ae9a-6506-8043-0ac5468d9dd4@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=gitter.spiros@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.