Re: [PATCH 5/5] tag: recognize rfc1991 signatures
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 8, 2010, 19:27 UTC
- Message-ID
- <7vlj53pqdk.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <AANLkTi=ZmBdJWKj1z0HE=tFoftzDSJaU5=Ji_1ywcA8+@mail.gmail.com>
Thiago Farina <tfransosi@gmail.com> writes:
Show 16 quoted lines
> On Sat, Nov 6, 2010 at 9:04 AM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> diff --git a/tag.c b/tag.c
>> index 5f9626c..18a5142 100644
>> --- a/tag.c
>> +++ b/tag.c
>> @@ -138,7 +138,8 @@ size_t parse_signature(const char *buf, unsigned long size)
>> {
>> char *eol;
>> size_t len = 0;
>> - while (len < size && prefixcmp(buf + len, PGP_SIGNATURE)) {
>> + while (len < size && prefixcmp(buf + len, PGP_SIGNATURE)
>> + && prefixcmp(buf + len, PGP_MESSAGE)) {
>
> nit: I think this && should be in the end of the previous line. (Not
> sure what is the preferred style though, comments?).I personally prefer to lay out a multi-line expression so that you can see the parse tree when you tilt your head the same way as when you view ;-), i.e. what Michael wrote, but when I inherited the codebase, nobody wrote multi-line expressions that way, so the standard coding style here has become "&& at the end" due to the "mimic the surrounding code" rule.