threads / discuss / 20970

System wide gitattributes

Subject: System wide gitattributes

## tl;dr

4 messages between Sep 16, 2009 and Sep 24, 2009.

replies: 3people: 4as markdown or json

David Förster· Sep 16, 2009, 11:50 UTC · lore
Hi there,

from the documentation I understand that things like external diff tools can be set up in a gitattributes file per repository (or subfolder).

Why is there no support for a ~/.gitattributes file? This would be very handy, for example to always get a textual diff of OpenDocument files.

Regards,
  - David
ps: Please cc, I'm not on the list.
Rustom Mody· Sep 16, 2009, 12:16 UTC · re: David Förster · lore

Re: System wide gitattributes

2009/9/16 David Förster <david.foerster@andrena.de>:
Show 8 quoted lines
> Hi there,
>
> from the documentation I understand that things like external diff tools can
> be set up in a gitattributes file per repository (or subfolder).
>
> Why is there no support for a ~/.gitattributes file? This would be very
> handy, for example to always get a textual diff of OpenDocument files.
>
They are there; see
http://www.kernel.org/pub/software/scm/git/docs/git-config.html#FILES
Matthieu Moy· Sep 16, 2009, 12:53 UTC · re: Rustom Mody · lore

Re: System wide gitattributes

Rustom Mody <rustompmody@gmail.com> writes:
Show 13 quoted lines
> 2009/9/16 David Förster <david.foerster@andrena.de>:
>> Hi there,
>>
>> from the documentation I understand that things like external diff tools can
>> be set up in a gitattributes file per repository (or subfolder).
>>
>> Why is there no support for a ~/.gitattributes file? This would be very
>> handy, for example to always get a textual diff of OpenDocument files.
>>
>
> They are there; see
>
> http://www.kernel.org/pub/software/scm/git/docs/git-config.html#FILES

~/.gitconfig is there, but I don't see a ~/.gitattributes file mentionned in this page ...

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Jeff King· Sep 24, 2009, 07:08 UTC · re: David Förster · lore

Re: System wide gitattributes

On Wed, Sep 16, 2009 at 01:50:03PM +0200, David Förster wrote:
Show 7 quoted lines
> from the documentation I understand that things like external diff
> tools can be set up in a gitattributes file per repository (or
> subfolder).
> 
> Why is there no support for a ~/.gitattributes file? This would be
> very handy, for example to always get a textual diff of OpenDocument
> files.

I think it is simply that nobody found it particularly useful until now, and so nobody implemented it. Gitattributes tend to be somewhat tied to the project files themselves. However, I can certainly see the use of something like "*.doc diff=word" in your ~/.gitattributes.

So I think it is a sound concept; it just needs somebody to volunteer to write it.

-Peff

← back to recent threads