git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH 2/2] branch: drop unused worktrees variable
Date: Fri, 1 Jul 2022 14:24:13 -0400	[thread overview]
Message-ID: <Yr87zb6TBTYlwCrw@coredump.intra.peff.net> (raw)
In-Reply-To: <220620.865ykvw2l4.gmgdl@evledraar.gmail.com>

On Mon, Jun 20, 2022 at 09:09:27PM +0200, Ævar Arnfjörð Bjarmason wrote:

> I.e. if we had a "foo(worktrees)" line before the "worktrees =
> get_worktrees()" we'd still remove these lines, but we don't want
> that. It just needs to do the appropriate cocci for "don't match it if
> you see this variable, unless the line matches...".
> 
> Of coures that only helps after your 1/2, so maybe there's not much
> value in it for your case, i.e. it won't be reaching across functions.

The cases that reach across functions are actually easier to find,
because the compiler knows that the function does not even look at its
parameter. And so you can remove it, and then remove it from the caller,
and so on.

Of course, that requires us to squash all of the -Wunused-parameter
noise. I've done that, but it's like 100 ugly patches. I haven't had the
time to polish it all up, but perhaps I'll at least send the start of
the transition soon.

-Peff

  reply	other threads:[~2022-07-01 18:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19  3:52 [PATCH 0/2] extra cleanups on top of ds/branch-checked-out Jeff King
2022-06-19  3:53 ` [PATCH 1/2] fetch: stop passing around unused worktrees variable Jeff King
2022-06-19  3:55 ` [PATCH 2/2] branch: drop " Jeff King
2022-06-20 19:09   ` Ævar Arnfjörð Bjarmason
2022-07-01 18:24     ` Jeff King [this message]
2022-06-21 15:56   ` Junio C Hamano
2022-06-19 18:12 ` [PATCH 0/2] extra cleanups on top of ds/branch-checked-out Derrick Stolee

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yr87zb6TBTYlwCrw@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).