Thread (1 message) 1 message, 1 author, 2023-07-05

Re: [PATCH 1/3] imap-send: use server conf argument in setup_curl()

From: Junio C Hamano <hidden>
Date: 2023-07-05 17:24:04

Jeff King [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help