Re: [PATCHv2 2/2] attr: drop C/C++ default extension mapping
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Dec 19, 2011, 20:51 UTC
- Message-ID
- <87hb0wnv43.fsf@thomas.inf.ethz.ch>
- In-Reply-To
- <20111219181003.GB12200@elie.hsd1.il.comcast.net>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 13 quoted lines
> Jeff King wrote: > >> But when you think about it, if our funcname pattern is bad, shouldn't >> preventing (2) be the right thing? That is, if our funcname pattern is >> really worse than the default language-agnostic match, wouldn't we be >> doing everybody a service to simply remove the builtin >> diff.cpp.xfuncname pattern? > > I don't see why. Anyone who has set "diff=cpp" either likes suffering > (maybe they are hoping to improve the pattern) or is working with a > codebase for which the current pattern works better than the default > behavior (maybe their codebase has a lot of goto labels aligned at > column zero). So removing the funcname pattern can only hurt them.
FWIW, the funcname pattern is not the only feature of the diff attributes. I set it mainly to get the built-in --word-diff split regexes.
I agree with Peff's patches though, until the cpp pattern improves, we should not turn them on by default.
--
Thomas Rast
trast@{inf,student}.ethz.ch