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

Re: [RFC/PATCH] attr: map builtin userdiff drivers to well-known extensions

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 25, 2011, 23:44 UTC
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:
Show 10 quoted lines
> 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.
Show 5 quoted lines
>> 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
Previous: Boaz HarroshNext: Jeff King
Message 7 of 23 in “git diff annoyance / feature request”
  1. Boaz HarroshAug 25, 2011
  2. Jeff KingAug 25, 2011
  3. attr: map builtin userdiff drivers to well-known extensionsJeff King, Aug 25, 2011
  4. Eric SunshineAug 25, 2011
  5. Jeff KingAug 25, 2011
  6. Boaz HarroshAug 25, 2011
  7. Eric SunshineAug 25, 2011
  8. Jeff KingAug 26, 2011
  9. Brandon CaseyAug 25, 2011
  10. Jeff KingAug 26, 2011
  11. Eric SunshineAug 26, 2011
  12. Brandon CaseyAug 26, 2011
  13. Junio C HamanoAug 25, 2011
  14. Jeff KingAug 26, 2011
  15. Junio C HamanoAug 26, 2011
  16. Thomas RastAug 26, 2011
  17. Alexey ShumkinAug 27, 2011
  18. Junio C HamanoAug 25, 2011
  19. Boaz HarroshAug 25, 2011
  20. Miles BaderAug 26, 2011
  21. René ScharfeAug 26, 2011
  22. Boaz HarroshAug 26, 2011
  23. Junio C HamanoAug 26, 2011

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.