From: Ben Boeckel <mathstuf@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v1 3/4] advice: remove uses of global `advice_` variables
Date: Mon, 2 Aug 2021 20:42:55 -0400 [thread overview]
Message-ID: <YQiRD2OA08iW2cx7@erythro.dev.benboeckel.internal> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2108022356300.55@tvgsbejvaqbjf.bet>
On Tue, Aug 03, 2021 at 00:06:48 +0200, Johannes Schindelin wrote:
> On Fri, 30 Jul 2021, Ben Boeckel wrote:
> > There are now function APIs to access this information, so the global
> > variables are no longer needed to communicate their values.
>
> This commit message implies that the reader remembers that `hw/advise-ng`
> introduced a new advice API with the express intent to eventually replace
> those global `advice_*` variables.
>
> However, it is not the responsibility of the reader to remember that. It
> is the responsibility of the commit message to describe this (so that the
> reader can either remember it, or learn about it in the first place).
That makes sense, thanks. I guess I'm used to projects where I'm at
least peripherally aware of most of what's going on, but that's because
I work on cross-cutting concerns on them for the most part (build
systems, CI, software process).
> Now, as for the diff, I can guess just how tedious all of the
> semi-repetitive `advice_*` -> `advice_enabled(ADVICE_*)` changes were from
> trying to verify that they are all correct.
One of the times a case-insensitive word diff rendering would be handy.
(Then letting the compiler verify that the new side actually works.)
> Big thank you for that!
You can thank this Vim macro which made the tedious bits trivial:
iadvice_enabled(<Esc>wgUwea)<Esc>]q
> However, even reading through the diff the second time, I managed to miss
> the subtlety that there were two `advice_set()` calls strewn in.
>
> As I pointed out in my review of patch 1/4, I would much prefer to have
> the addition of those callers in 1/4 along with the introduction of said
> function.
>
> However, now that I write this, I would like to correct my advice (pun
> intended) from 1/4 to leave the removal of the assignment of the global
> `advice_*` variables here: It would make much more sense to move them to
> patch 4/4.
Sounds good. I'll still keep it as a separate patch, but just have one
for the read-only side, then a new patch which adds the write API and
transforms the 2 write instances. The final patch can then stay the
same. In short:
- 2/4 (read-only bits) -> v2 1/4
- 3/4 -> v2 2/4
- 1/4 + 3/4 (write bits) -> v2 3/4
- 4/4 -> mostly the same
Thanks,
--Ben
next prev parent reply other threads:[~2021-08-03 0:43 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-31 2:25 [PATCH v1 0/4] advice: remove usage of `advice_*` global variables Ben Boeckel
2021-07-31 2:25 ` [PATCH v1 1/4] advice: add a function to set the value of an advice type Ben Boeckel
2021-08-02 21:56 ` Johannes Schindelin
2021-07-31 2:25 ` [PATCH v1 2/4] advice: add enum variants for missing advice variables Ben Boeckel
2021-08-02 21:52 ` Johannes Schindelin
2021-08-03 0:36 ` Ben Boeckel
2021-07-31 2:25 ` [PATCH v1 3/4] advice: remove uses of global `advice_` variables Ben Boeckel
2021-08-02 22:06 ` Johannes Schindelin
2021-08-03 0:42 ` Ben Boeckel [this message]
2021-07-31 2:25 ` [PATCH v1 4/4] advice: remove static global variables for advice tracking Ben Boeckel
2021-08-02 22:09 ` Johannes Schindelin
2021-08-03 0:44 ` Ben Boeckel
2021-08-02 22:15 ` [PATCH v1 0/4] advice: remove usage of `advice_*` global variables Johannes Schindelin
2021-08-03 0:45 ` Ben Boeckel
2021-08-05 23:03 ` [PATCH v2 " Ben Boeckel
2021-08-05 23:03 ` [PATCH v2 1/4] advice: add enum variants for missing advice variables Ben Boeckel
2021-08-05 23:03 ` [PATCH v2 2/4] advice: remove read uses of global `advice_` variables Ben Boeckel
2021-08-05 23:03 ` [PATCH v2 3/4] advice: add `advice_set` to update advice settings at runtime Ben Boeckel
2021-08-05 23:03 ` [PATCH v2 4/4] advice: remove static global variables for advice tracking Ben Boeckel
2021-08-06 19:13 ` [RFC PATCH v3 0/4] advice: remove usage of `advice_*` global variables Ævar Arnfjörð Bjarmason
2021-08-06 19:13 ` [RFC PATCH v3 1/4] advice: add enum variants for missing advice variables Ævar Arnfjörð Bjarmason
2021-08-06 19:13 ` [RFC PATCH v3 2/4] advice: remove read uses of most global `advice_` variables Ævar Arnfjörð Bjarmason
2021-08-06 19:30 ` Eric Sunshine
2021-08-06 19:13 ` [RFC PATCH v3 3/4] advice: remove use of global advice_add_embedded_repo Ævar Arnfjörð Bjarmason
2021-08-06 20:01 ` Eric Sunshine
2021-08-06 19:13 ` [RFC PATCH v3 4/4] advice: move advice.graftFileDeprecated squashing to commit.[ch] Ævar Arnfjörð Bjarmason
2021-08-23 10:43 ` [PATCH v4 0/4] advice: remove usage of `advice_*` global variables Ævar Arnfjörð Bjarmason
2021-08-23 10:43 ` [PATCH v4 1/4] advice: add enum variants for missing advice variables Ævar Arnfjörð Bjarmason
2021-08-23 10:44 ` [PATCH v4 2/4] advice: remove read uses of most global `advice_` variables Ævar Arnfjörð Bjarmason
2021-08-23 10:44 ` [PATCH v4 3/4] advice: remove use of global advice_add_embedded_repo Ævar Arnfjörð Bjarmason
2021-08-23 10:44 ` [PATCH v4 4/4] advice: move advice.graftFileDeprecated squashing to commit.[ch] Ævar Arnfjörð Bjarmason
2021-08-25 19:07 ` Junio C Hamano
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=YQiRD2OA08iW2cx7@erythro.dev.benboeckel.internal \
--to=mathstuf@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 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).