Re: [PATCH v5 2/3] gpg-interface: allow sign_buffer() to use default signing key
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Mar 12, 2026, 20:24 UTC
- Message-ID
- <abMguEa0Lmga19Dr@denethor>
- In-Reply-To
- <xmqqsea4dclc.fsf@gitster.g>
On 26/03/12 01:20PM, Junio C Hamano wrote:
Show 16 quoted lines
> Justin Tobler <jltobler@gmail.com> 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 &&.
That's completely fair. I don't mind fixing and sending another version.
Thanks, -Justin