Subject: Re: bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified

From: Juri Linkov <[email-masked]>
Date: Fri, 12 Jul 2024 20:55:31 +0300

close 72059 31.0.50
thanks

>> >   +(with-eval-after-load 'mm-uu
>> >   +  (setf (nth 1 (alist-get 'git-format-patch mm-uu-type-alist))
>> >   +        "^-- \\|^$"))
>> 
>> Indeed, this is the right thing to do.  In the past
>> few days I have seen more patches without attachments
>> that makes hard to read them without fontification.
>> So such change could help to greatly improve readability.
>> However, often there is also text after the patch,
>> so nil for 'end-point' doesn't look right.  So better
>> to end the patch with an empty line, because properly
>> formatted patches have no empty lines in them.
>> 
>> diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
>> index 3c7e3cbdf1a..26b2c03a3dc 100644
>> --- a/lisp/gnus/mm-uu.el
>> +++ b/lisp/gnus/mm-uu.el
>> @@ -173,7 +173,7 @@ mm-uu-type-alist
>>       ,#'mm-uu-diff-test)
>>      (git-format-patch
>>       "^diff --git "
>> -     "^-- "
>> +     "^$"
>>       ,#'mm-uu-diff-extract
>>       nil
>>       ,#'mm-uu-diff-test)
>> 
>> + PS: the patch above should end before this line.
>> - I tested it on a few posts, and everything looks correct.
>
> Ah! Nice, this indeed looks better than my proposal.  Thanks!  Hopefully
> this will be acceptable for merging.

Thanks for the request!  So now this is pushed to master.