Subject: Re: [PATCH v5 2/3] gpg-interface: allow sign_buffer() to use default signing key

From: Junio C Hamano <[email-masked]>
Date: Thu, 12 Mar 2026 13:20:15 -0700

Justin Tobler <[email-masked]> writes:

> -	return use_format->sign_buffer(buffer, signature, signing_key);
> +	if (flags & SIGN_BUFFER_USE_DEFAULT_KEY && (!signing_key || !*signing_key))
> +		signing_key = keyid_to_free = get_signing_key();

Micronit.

I would have preferred to see an extra pair of parentheses here, i.e.,

	if ((flags & SIGN_BUFFER_USE_DEFAULT_KEY) &&
	    (!signing_key || !*signing_key))
                    
It would make it more obvious what two conditions are required to
enter the body, even to those who well know the operator precedence
rules between & and &&.