From: Eric Sunshine Date: Thu, 25 Aug 2011 23:44:25 GMT Subject: Re: [RFC/PATCH] attr: map builtin userdiff drivers to well-known extensions Message-ID: <4E56DE59.5050601@sunshineco.com> In-Reply-To: <20110825210654.GA11077@sigill.intra.peff.net> On 08/25/2011 05:06 PM, Jeff King wrote: > On Thu, Aug 25, 2011 at 05:00:51PM -0400, Eric Sunshine wrote: > >>> Also, any other extensions that would go into such a list? I have no >>> idea what the common extension is for something like pascal or csharp. >> >> C# uses extension ".cs". >> >> ".cpp" is common, in fact often required, by Windows compilers. > > Thanks, added both to my list. To clarify, I meant to say that for C++, .cpp is common/required on Windows. >> What about ".h" and ".hpp"? > > How well do our cpp patterns do with header files? I imagine they're > better than the default, but I don't think I've ever really tried > anything tricky. I scanned through a number of revisions for one of my long-running C++ projects comparing the diff of header files with and without "*.h diff=cpp". In some header files in this project, the oft-used C++ keywords public:, protected:, and private: appear at start-of-line. In such cases, the default diff emits a less-than-useful hunk header: @@ -19,8 +19,8 @@ public: whereas, "diff=cpp" emits: @@ -19,8 +19,8 @@ class Foobar -- ES