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 #22 received at 72059 <at> debbugs.gnu.org (full text, mbox):

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




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.