Re: diffutils file mode (was Re: [PATCH 5.15 00/37] 5.15.96-rc2 review)

From: Paul Eggert
Date: Fri Feb 24 2023 - 15:38:22 EST


On 2023-02-24 11:16, Linus Torvalds wrote:
GNU diffutils have never actually grown the
ability to generate those extensions

Thanks for pointing this out. I added this to our list of things to do, by installing the attached patch to the GNU diffutils TODO file. If this patch's wording isn't right, please let me know, as I haven't read this whole email thread, just the three emails sent directly to me.
From 3fa7218567bdcf958f1342c13c848c9e2f2d38c5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Fri, 24 Feb 2023 12:13:12 -0800
Subject: [PATCH] maint: add 'diff --git' TODO

* TODO: Suggest better compatibility with 'git diff -p'.
From a suggestion by Linus Torvalds
<https://lkml.org/lkml/2023/2/24/797>.
---
TODO | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/TODO b/TODO
index 5132de8..25fc22b 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,9 @@
+Add --git option to generate output compatible with 'git diff -p'.
+This would behave like 'diff -p', except that it would also generate
+the extended headers 'old mode', 'new mode', 'deleted file mode', and
+'new file mode', and it would quote file names with unusual characters.
+GNU patch already parses this format.
+
Add --include option (opposite of --exclude).

Look into sdiff improvement here:
--
2.37.2