git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH] Enable diff=java for all *.java source files

From
Shawn O. Pearce <spearce@spearce.org>
Date
Aug 15, 2008, 15:40 UTC
Message-ID
<1218814822-23307-1-git-send-email-spearce@spearce.org>

This (usually) gets more reasonable function headers to appear in the header line for a diff hunk. Its slightly better than the default C rules.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .gitattributes |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..f57840b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.java diff=java
-- 
1.6.0.rc3.250.g8dd0
Next: Robin Rosenberg
Message 1 of 3 in “Enable diff=java for all *.java source files”
  1. Enable diff=java for all *.java source filesShawn O. Pearce, Aug 15, 2008
  2. Robin RosenbergAug 18, 2008
  3. Shawn O. PearceAug 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.