diff: Add support for man(7) pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux