From b5f5957b15bdbef5fb8f0cee415dce3e56642c05 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Wed, 21 Feb 2024 12:55:17 +0200 Subject: [PATCH] gitattributes: Fix diff hunk headers Git is really bad at identifying the correct Python function in the diff hunk headers (this is a change in Metadata.sign()): @@ -384,7 +384,7 @@ class Metadata(Generic[T]): Amazingly there is much better context detection built-in, just not enabled. The same diff hunk headers with this commit looks like: @@ -384,7 +384,7 @@ def sign( Signed-off-by: Jussi Kukkonen --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index d37f0228..d67862fb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ # Test data should not be modified on checkout, regardless of host settings *.json binary +*.py diff=python