Permalink
Browse files

New .gitattributes file.

This should assist in keeping line endings straight.
It is designed to enforce LF endings everywhere except
for files specifically for windows.
  • Loading branch information...
1 parent 3136e53 commit e4e8578c5cf433648fa5428bfb2ad2ce8d347439 @paulp paulp committed Sep 16, 2012
Showing with 44 additions and 0 deletions.
  1. +26 −0 .gitattributes
  2. +8 −0 gitconfig.SAMPLE
  3. +6 −0 tools/class-dump
  4. +4 −0 tools/jar-dump
View
@@ -0,0 +1,26 @@
+# These files are text and should be normalized (convert crlf => lf)
+*.c text
+*.check text
+*.css text
+*.html text
+*.java text
+*.js text
+*.sbt text
+*.scala text
+*.sh text
+*.txt text
+*.xml text
+
+# Windows-specific files get windows endings
+*.bat eol=crlf
+*.cmd eol=crlf
+*-windows.tmpl eol=crlf
+
+# Some binary file types for completeness
+# (binary is a macro for -text -diff)
+*.dll binary
+*.gif binary
+*.jpg binary
+*.png binary
+*.class -text diff=class
+*.jar -text diff=jar
View
@@ -0,0 +1,8 @@
+# With something like this in .git/config or ~/.gitconfig
+# you can diff class files and jar files.
+[diff "class"]
+ textconv = tools/class-dump
+ cachetextconv = true
+[diff "jar"]
+ textconv = tools/jar-dump
+ cachetextconv = true
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+
+JAVAP_OPTS="-private"
+
+[[ -n "$1" ]] && ( cd "$(dirname "$1")" && javap $JAVAP_OPTS "$(basename "${1%%.class}")" )
View
@@ -0,0 +1,4 @@
+#!/bin/sh
+#
+
+jar tf "$1" | sort

0 comments on commit e4e8578

Please sign in to comment.