git: e731a7cdf1 - main - Initialize .gitattributes for doc

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Thu, 12 Jun 2025 15:46:18 UTC
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/doc/commit/?id=e731a7cdf17bbf4a4effa58d870d8d3ab4ec3ade

commit e731a7cdf17bbf4a4effa58d870d8d3ab4ec3ade
Author:     Minsoo Choo <minsoochoo0122@proton.me>
AuthorDate: 2025-06-12 15:44:51 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2025-06-12 15:44:51 +0000

    Initialize .gitattributes for doc
    
    .gitattributes instructs git custom diff handling which helps the
    readability of git diff in development. This is especially useful for
    binary files such as images, as it prevents git from printing
    meaningless diffs.
    
    Differential Revision:  https://reviews.freebsd.org/D43082
---
 .gitattributes | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..de6a72abd5
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,9 @@
+*.css   diff=css
+*.html  diff=html
+*.pl    diff=perl
+*.rb    diff=ruby
+
+# Images are binary files
+*.ico   binary
+*.jpg   binary
+*.png   binary