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


View this message in rfc822 format

From: Luís Henriques <henrix <at> camandro.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 72059 <at> debbugs.gnu.org, Robert Pluim <rpluim <at> gmail.com>, Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Subject: bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified
Date: Fri, 12 Jul 2024 09:53:38 +0100
On Fri, Jul 12, 2024 at 09:51:16AM +0300, Juri Linkov wrote:
> >   +(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.

Cheers,
--
Luis




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.