Teach git about ObjC files
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Mar 2010 20:01:32 +0000 (20:01 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Mar 2010 20:01:32 +0000 (20:01 +0000)
Fixes <http://webkit.org/b/36015>.

Reviewed by Tim Hatcher.

* .gitattributes: Set the diff attribute for .m and .mm files, and .h
files in Mac-specific directories. This can be used to generate
more-readable diffs of ObjC files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55851 268f45cc-cd09-0410-ab3c-d52691b4dbfc

.gitattributes
ChangeLog

index 80386aeb3e2cb0b6b0df2f44f5fba48191559dbd..f6df8bbfcab46cb5302f829a6b2a1f66a528813f 100644 (file)
@@ -2,6 +2,19 @@
 # git config merge.changelog.driver "resolve-ChangeLogs --merge-driver %O %A %B"
 ChangeLog* merge=changelog
 
+# To enable smart diffing of ObjC[++] files, run the following commands:
+# git config diff.objcpp.xfuncname "^[-+@a-zA-Z_].*$"
+# git config diff.objcppheader.xfuncname "^[@a-zA-Z_].*$"
+*.m diff=objc
+*.mm diff=objcpp
+mac/*.h diff=objcppheader
+*/mac/*.h diff=objcppheader
+*/*/mac/*.h diff=objcppheader
+objc/*.h diff=objcppheader
+*/objc/*.h diff=objcppheader
+*/*/objc/*.h diff=objcppheader
+WebKitTools/WebKitLauncher/*.h diff=objcppheader
+
 JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln -crlf
 JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj -crlf
 JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops -crlf
index e3b807ad55ac0946b89d18534733ef5b5eda4cb9..64db3f4234438d8635b78b1fa1c5549f011bf28d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-11  Adam Roben  <aroben@apple.com>
+
+        Teach git about ObjC files
+
+        Fixes <http://webkit.org/b/36015>.
+
+        Reviewed by Tim Hatcher.
+
+        * .gitattributes: Set the diff attribute for .m and .mm files, and .h
+        files in Mac-specific directories. This can be used to generate
+        more-readable diffs of ObjC files.
+
 2010-03-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
         Unreviewed. Versioning for 1.1.23.