Re: [PATCH 1/3] imap-send: use server conf argument in setup_curl()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 5, 2023, 17:23 UTC
- Message-ID
- <xmqq35222rx1.fsf@gitster.g>
- In-Reply-To
- <20230703063330.GA3524421@coredump.intra.peff.net>
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.