GNU bug report logs - #72059
[PATCH] Ensure that git diffs without signature (--) are properly identified

Previous Next

Package: emacs;

Reported by: Luis Henriques <henrix <at> camandro.org>

Date: Thu, 11 Jul 2024 13:10:03 UTC

Severity: normal

Tags: patch

Merged with 72058

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #30 received at control <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Luís Henriques <henrix <at> camandro.org>
Cc: 72059 <at> debbugs.gnu.org, Robert Pluim <rpluim <at> gmail.com>,
 Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Subject: Re: bug#72059: [PATCH] Ensure that git diffs without signature (--)
 are properly identified
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.




This bug report was last modified 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.