Hi Bruno,
On 4/13/24 11:08 AM, Bruno Haible wrote:
> That will be nice, indeed. Please, can you provide a patch (with a ChangeLog
> entry)?
Sure, I attached a patch.
Collin
From 9e2fcc6d5e8f30b402627cc73b7da1109c047249 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 13 Apr 2024 11:16:44 -0700
Subject: [PATCH] Improve 'git diff' of Python files.
* .gitattributes: Add a rule for *.py files.
---
.gitattributes | 3 +++
ChangeLog | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/.gitattributes b/.gitattributes
index bad5997b57..c7fecf66a5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,3 +8,6 @@ ChangeLog merge=merge-changelog
# Run this to make 'git diff' on .m4 files give nicer hunk context:
# git config diff.m4.xfuncname '^((AC_DEFUN|m4_define)[^,)]*)'
*.m4 diff=m4
+
+# Improve diff hunk context on Python files.
+*.py diff=python
diff --git a/ChangeLog b/ChangeLog
index 4a5594c5cd..c9349f22ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-04-13 Collin Funk <collin.fu...@gmail.com>
+
+ Improve 'git diff' of Python files.
+ * .gitattributes: Add a rule for *.py files.
+
2024-04-13 Collin Funk <collin.fu...@gmail.com>
gnulib-tool.py: Fix extra arguments to function call.
--
2.44.0