From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] imap-send: use server conf argument in setup_curl()
Date: Wed, 05 Jul 2023 10:23:54 -0700 [thread overview]
Message-ID: <xmqq35222rx1.fsf@gitster.g> (raw)
In-Reply-To: <20230703063330.GA3524421@coredump.intra.peff.net> (Jeff King's message of "Mon, 3 Jul 2023 02:33:30 -0400")
Jeff King <peff@peff.net> writes:
> Our caller passes in an imap_server_conf struct, but we ignore it
> totally, and instead read the config directly from the global "server"
> variable. This works OK, since our sole caller will pass in that same
> global variable.
This obviously is the right thing to do.
A much inferiour alternative would be to drop the srvc parameter to
the callee and that will make it clear that we are only working on
the singleton 'imap_server_conf' all the time (which is not entirely
incorrect), but I do not think there is no point in making any large
change to this program at this point in either direction.
> But the intent seems to have been to use the passed-in
> variable, as otherwise it has no purpose (and many other functions use
> the same pattern).
Yup. Thanks.
next prev parent reply other threads:[~2023-07-05 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 6:32 [PATCH 0/3] imap-send: some -Wunused-parameter cleanups Jeff King
2023-07-03 6:33 ` [PATCH 1/3] imap-send: use server conf argument in setup_curl() Jeff King
2023-07-05 17:23 ` Junio C Hamano [this message]
2023-07-03 6:34 ` [PATCH 2/3] imap-send: drop unused parameter from imap_cmd_cb callback Jeff King
2023-07-05 17:25 ` Junio C Hamano
2023-07-03 6:34 ` [PATCH 3/3] imap-send: drop unused fields from imap_cmd_cb Jeff King
2023-07-05 17:18 ` [PATCH 0/3] imap-send: some -Wunused-parameter cleanups 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=xmqq35222rx1.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).