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: https://svn.webkit.org/repository/webkit/trunk@55851 268f45cc-cd09-0410-ab3c-d52691b4dbfc

.gitattributes
ChangeLog

index 80386ae..f6df8bb 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 e3b807a..64db3f4 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.