Skip to content

Commit 33d5dfd

Browse files
rybakjyukutyo
authored andcommittedAug 18, 2023
8314543: gitattributes: make diffs easier to read
Git supports special hunk headers for several languages in diff output, which make it easier to read diffs of files in that language, generated by Git (git-diff, git-show, `git log -p`, etc). For details, see `git help gitattributes` or the online documentation.[1] Add entries to the root .gitattributes file to support showing the hunk headers for Java, C, C++, Markdown, Shell script, HTML, and CSS. This makes it easier to read diffs generated by Git. [1] https://git-scm.com/docs/gitattributes Reviewed-by: erikj, ksakata
1 parent 5058854 commit 33d5dfd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎.gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
* -text
2+
*.java diff=java
3+
*.c diff=cpp
4+
*.h diff=cpp
5+
*.cpp diff=cpp
6+
*.hpp diff=cpp
7+
*.md diff=markdown
8+
*.sh diff=bash
9+
*.html diff=html
10+
*.css diff=css

0 commit comments

Comments
 (0)
Please sign in to comment.