Subject: Re: [PATCH v3] send-email: add --[no-]outlook-id-fix option

From: Junio C Hamano <[email-masked]>
Date: Tue, 29 Apr 2025 08:57:31 -0700

Aditya Garg <[email-masked]> writes:

> +    --[no-]outlook-id-fix          * This server munges Message-ID. Retrieve it from
> +                                     the server.

We know how to retrieve the new message-id only from Outlook server,
but I fear that the above does not convey it (unless we count the
substring "outlook" in the option name).  I came up with

    --[no-]outlook-id-fix          * The smtp host is an Outlook server that
                                     munges the Message-ID.

as a replacement, but I am not sure if it is much better.

> -    --no-smtp-auth                   Disable SMTP authentication. Shorthand for
> +    --no-smtp-auth                 * Disable SMTP authentication. Shorthand for
>                                       `--smtp-auth=none`

Good eyes.

As long as it is mentioned in the proposed log message, it is OK to
make such a small and unrelated correction "while at it".

    $ git log -p --grep=While.at.it

will find many existing examples.

>  sub is_outlook {
>  	my ($host) = @_;
> -	return ($host eq 'smtp.office365.com' || $host eq 'smtp-mail.outlook.com');
> +	if ($outlook_id_fix eq 'auto') {
> +		$outlook_id_fix =
> +			($host eq 'smtp.office365.com' ||
> +			 $host eq 'smtp-mail.outlook.com') ? 1 : 0;
> +	}	return $outlook_id_fix;

No syntax error here, but let's have the final "return $outlook_id_fix;"
on its own line after "if (...) { ... }" statement.