* No way to have global diff settings? (global .gitattributes feature request)
@ 2010-04-21 17:05 Štěpán Němec
2010-04-26 13:44 ` Štěpán Němec
0 siblings, 1 reply; 4+ messages in thread
From: Štěpán Němec @ 2010-04-21 17:05 UTC (permalink / raw)
To: git
Hello,
it seems there is no global .gitattribute equivalent to .gitignore or
.gitconfig. Wouldn't it make much sense to have one? Failing that, there
really should be a way to specify some global diff options at least.
My use case:
I wanted to specify something like -F "^(" to git diff for lisp files.
But well, git diff has no -F option! So shruggar from #git pointed me to
gitattributes. OK, that's great and works, but now I have to put
.gitattributes or info/attributes to all repos with lisp files in them?
That rather sucks, if you ask me.
So I would like to ask if there is a way, and if not, if it could be
considered a useful feature addition.
Thanks,
Štěpán
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No way to have global diff settings? (global .gitattributes feature request)
2010-04-21 17:05 No way to have global diff settings? (global .gitattributes feature request) Štěpán Němec
@ 2010-04-26 13:44 ` Štěpán Němec
2010-04-26 13:48 ` Matthieu Moy
0 siblings, 1 reply; 4+ messages in thread
From: Štěpán Němec @ 2010-04-26 13:44 UTC (permalink / raw)
To: git
Štěpán Němec <stepnem@gmail.com> writes:
> Hello,
>
> it seems there is no global .gitattribute equivalent to .gitignore or
> .gitconfig. Wouldn't it make much sense to have one? Failing that, there
> really should be a way to specify some global diff options at least.
>
> My use case:
>
> I wanted to specify something like -F "^(" to git diff for lisp files.
> But well, git diff has no -F option! So shruggar from #git pointed me to
> gitattributes. OK, that's great and works, but now I have to put
> .gitattributes or info/attributes to all repos with lisp files in them?
> That rather sucks, if you ask me.
>
> So I would like to ask if there is a way, and if not, if it could be
> considered a useful feature addition.
>
> Thanks,
>
> Štěpán
PING
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No way to have global diff settings? (global .gitattributes feature request)
2010-04-26 13:44 ` Štěpán Němec
@ 2010-04-26 13:48 ` Matthieu Moy
2010-04-26 14:48 ` Michael J Gruber
0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2010-04-26 13:48 UTC (permalink / raw)
To: Štěpán Němec; +Cc: git
Štěpán Němec <stepnem@gmail.com> writes:
>> Hello,
>>
>> it seems there is no global .gitattribute equivalent to .gitignore or
>> .gitconfig. Wouldn't it make much sense to have one? Failing that, there
>> really should be a way to specify some global diff options at least.
I'd like this feature too. My use-case is to have antiword and odt2txt
as textconv filters for .doc and .odt files, which I always want to
do. But probably the feature won't get implemented until one of us
writes a patch ;-) (I may have time later, but not before a few
days/weeks).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No way to have global diff settings? (global .gitattributes feature request)
2010-04-26 13:48 ` Matthieu Moy
@ 2010-04-26 14:48 ` Michael J Gruber
0 siblings, 0 replies; 4+ messages in thread
From: Michael J Gruber @ 2010-04-26 14:48 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Štěpán Němec, git
Matthieu Moy venit, vidit, dixit 26.04.2010 15:48:
> Štěpán Němec <stepnem@gmail.com> writes:
>
>>> Hello,
>>>
>>> it seems there is no global .gitattribute equivalent to .gitignore or
>>> .gitconfig. Wouldn't it make much sense to have one? Failing that, there
>>> really should be a way to specify some global diff options at least.
>
> I'd like this feature too. My use-case is to have antiword and odt2txt
> as textconv filters for .doc and .odt files, which I always want to
> do. But probably the feature won't get implemented until one of us
> writes a patch ;-) (I may have time later, but not before a few
> days/weeks).
I leave it up to you to do the (re)search, but there's some preexisting
patches and discussion around this topic. The upshot is that currently:
SYSTEM | GLOBAL | VERSIONED | LOCAL
$(prefix)/etc/gitconfig | $(HOME)/.gitconfig | N/A |
$(GIT_DIR)/config
N/A | N/A | .gitattributes (rec.) |
$GIT_DIR/info/attributes
N/A | N/A | .gitignore (rec.) |
$GIT_DIR/info/exclude
There's also GIT_CONFIG overriding the defaults, and core.exludesfiles
(yes, with s!); and of course command line parameters.
There's been requests for versioned config, for multiple sources of
system config (think config.d/*), for global and system versions of
attributes and exclude/ignore, for saner naming of exclude(s) vs.
ignore, and, finally, for stopping all this madness, or rather: putting
all of it in a subdir, aptly named gitconfig... no-no, no-go... or
following the XDG conventions, or...
So, you see: You may suggest something simple like core.attributesfile.
I have a prediction how that goes.
But now, right after 1.7.1, it might be a good time to really settle
this in a future-proof yet backwards-compatible way.
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-26 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 17:05 No way to have global diff settings? (global .gitattributes feature request) Štěpán Němec
2010-04-26 13:44 ` Štěpán Němec
2010-04-26 13:48 ` Matthieu Moy
2010-04-26 14:48 ` Michael J Gruber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).