From: Stephen Bash Date: Thu, 26 Jan 2012 13:51:52 GMT Subject: Re: [PATCH] Don't search files with an unset "grep" attribute Message-ID: <1af46e50-fdc5-47b8-af36-d070d91dd954@mail> In-Reply-To: <20120125214625.GA4666@sigill.intra.peff.net> ----- Original Message ----- > From: "Jeff King" > Sent: Wednesday, January 25, 2012 4:46:26 PM > Subject: Re: [PATCH] Don't search files with an unset "grep" attribute > > ... snip ... > > So if this was all spelled: > > $ cat .gitattributes > *.pdf filetype=pdf > $ cat .git/config > [filetype "pdf"] > binary = true > textconv = pdf2txt > > I think it would be a no-brainer that those type attributes should > apply to "git grep". Looking at this purely as a user, what difference/advantage would that bring versus $ cat .gitattributes *.pdf binary=true textconv=pdf2text or $ cat .gitattributes [attr]pdf binary=true textconv=pdf2text *.pdf pdf (admittedly I have no clue if gitattributes actually supports anything like this) I guess my point is as a user, I've gravitated to "gitattributes is about files in my repo, gitconfig is about Git's behavior" (though this is a grey area). To partially answer my own question: one advantage of putting the filetype information in a config file is it allows system- and user-wide filetype settings. In my personal experience I've always handled that information on a per-repository basis, but that doesn't mean everyone would want to. Thanks, Stephen