From: Alejandro Colomar <alx.manpages@gmail.com>
To: Git <git@vger.kernel.org>
Subject: diff: Add support for man(7) pages
Date: Thu, 20 Oct 2022 14:19:06 +0200 [thread overview]
Message-ID: <ce09bfae-091f-7c62-5e40-2784906d5370@gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1085 bytes --]
Hi!
I added the following to my gitconfig and attributes files to improve
diffs in manual pages. Would you mind adding support for them in git(1)?
Thanks,
Alex
P.S.: The extension I used in the attributes file is imperfect, since a
glob wouldn't allow me as much precission as a regex. With a regex, it
would be written as '\.[1-9][[:lower:]]*$'.
---
git: diff "man": Correctly interpret man(7) pages.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
diff --git a/home/user/.config/git/attributes
b/home/user/.config/git/attributes
new file mode 100644
index 0000000..652558f
--- /dev/null
+++ b/home/user/.config/git/attributes
@@ -0,0 +1 @@
+*.[1-9]* diff=man
diff --git a/home/user/.gitconfig b/home/user/.gitconfig
index 72ddc50..adb6cbb 100644
--- a/home/user/.gitconfig
+++ b/home/user/.gitconfig
@@ -27,3 +27,5 @@
signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
[diff]
algorithm = histogram
+[diff "man"]
+ xfuncname = "^\\.S[SH] .*$"
--
<http://www.alejandro-colomar.es/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
reply other threads:[~2022-10-20 12:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce09bfae-091f-7c62-5e40-2784906d5370@gmail.com \
--to=alx.manpages@gmail.com \
--cc=git@vger.kernel.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 NNTP newsgroup(s).