# diff: use built-in patterns by default via git attributes

2 messages from 2014-12-09 to 2014-12-09. Participants: Daniel Hahler, Jeff King.
Thread: https://gitlist.dev/t/38155

## Daniel Hahler, 2014-12-09 20:18

Subject: diff: use built-in patterns by default via git attributes
Message-ID: <54875916.7020107@thequod.de>
URL: https://gitlist.dev/e/54875916.7020107%40thequod.de

```
Hi,

I'm wondering why the built-in patterns (defined in userdiff.c) are not
being applied by default, e.g. what you would normally do in
core.attributesfile via:

    *.py diff=python

Wouldn't it make sense to provide certain defaults for attributes, where
Git provides enhanced patterns?


Regards,
Daniel.

-- 
http://daniel.hahler.de/



```

## Jeff King, 2014-12-09 20:42

Subject: Re: diff: use built-in patterns by default via git attributes
Message-ID: <20141209204247.GD12001@peff.net>
URL: https://gitlist.dev/e/20141209204247.GD12001%40peff.net
In-Reply-To: <54875916.7020107@thequod.de>

```
On Tue, Dec 09, 2014 at 09:18:30PM +0100, Daniel Hahler wrote:

> I'm wondering why the built-in patterns (defined in userdiff.c) are not
> being applied by default, e.g. what you would normally do in
> core.attributesfile via:
> 
>     *.py diff=python
> 
> Wouldn't it make sense to provide certain defaults for attributes, where
> Git provides enhanced patterns?

It's been discussed:

  http://thread.gmane.org/gmane.comp.version-control.git/187269

It ended up with a lot of back-and-forth over which extensions belonged
to which type, and whether the C funcname pattern was terrible or not. I
got sick of it and dropped the patch.

You are welcome to try resurrecting it. :) It might help to read the
discussion and drop any contentious names. Since that thread, the C/C++
pattern has improved greatly, so it might not meet so much resistance.

-Peff

```
