[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#72059: [PATCH] Ensure that git diffs without signature (--) are prop
From: |
Juri Linkov |
Subject: |
bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified |
Date: |
Fri, 12 Jul 2024 09:51:16 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
> +(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.
bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified, Eli Zaretskii, 2024/07/11