From: Collin Funk <collin.funk1@gmail.com>
To: Bruno Haible <bruno@clisp.org>, bug-gnulib@gnu.org
Subject: Improve 'git diff' of Python files.
Date: Sat, 13 Apr 2024 11:18:25 -0700 [thread overview]
Message-ID: <d0cdc87d-8bb5-4671-86ab-56208909cb15@gmail.com> (raw)
In-Reply-To: <7025375.mJcRFVBj74@nimes>
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
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
[-- Attachment #2: 0001-Improve-git-diff-of-Python-files.patch --]
[-- Type: text/x-patch, Size: 1106 bytes --]
From 9e2fcc6d5e8f30b402627cc73b7da1109c047249 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@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.funk1@gmail.com>
+
+ Improve 'git diff' of Python files.
+ * .gitattributes: Add a rule for *.py files.
+
2024-04-13 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Fix extra arguments to function call.
--
2.44.0
next prev parent reply other threads:[~2024-04-13 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-13 17:12 gnulib-tool.py: Fix extra arguments to function call Collin Funk
2024-04-13 17:26 ` Collin Funk
2024-04-13 18:08 ` .gitattributes Bruno Haible
2024-04-13 18:18 ` Collin Funk [this message]
2024-04-13 18:29 ` Improve 'git diff' of Python files Bruno Haible
2024-04-13 18:03 ` gnulib-tool.py: Fix extra arguments to function call Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0cdc87d-8bb5-4671-86ab-56208909cb15@gmail.com \
--to=collin.funk1@gmail.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).