Add git configuration templates to improve diff hunk header detection.
authorSarah Morgensen <iskarian@mgsn.dev>
Mon, 20 Sep 2021 23:37:44 +0000 (16:37 -0700)
committerMarius Bakke <marius@gnu.org>
Wed, 13 Oct 2021 22:24:34 +0000 (00:24 +0200)
This is a follow-up to commit 9fc8ae4171e5da4939a64fc6d684c8b9d85bbe84, which
missed two hunks from <https://issues.guix.gnu.org/50363>.

Reported by hackeryarn on #guix.

* .gitattributes, etc/git/gitconfig: New files.

Signed-off-by: Marius Bakke <marius@gnu.org>
.gitattributes [new file with mode: 0644]
etc/git/gitconfig [new file with mode: 0644]

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..b31f7fd
--- /dev/null
@@ -0,0 +1,3 @@
+*.scm       diff=scheme
+*.scm.in    diff=scheme
+*.texi      diff=texinfo
diff --git a/etc/git/gitconfig b/etc/git/gitconfig
new file mode 100644 (file)
index 0000000..c9ebdc8
--- /dev/null
@@ -0,0 +1,5 @@
+[diff "scheme"]
+       xfuncname = "^(\\(define.*)$"
+
+[diff "texinfo"]
+       xfuncname = "^@node[[:space:]]+([^,]+).*$"