Subject: Re: git check-attr in bare repositories

From: Jakub Narebski <[email-masked]>
Date: Tue, 30 Mar 2010 14:39:25 -0700 (PDT)

Jonathan Nieder <[email-masked]> writes:

> Eli Barzilay wrote:
> 
> > Well, using the index this way seems like a kind of a hack anyway, so
> > I'm not sure that there is any reason to do this.
> 
> Most git commands do write out the tree they are working with to an
> (in-memory or on-disk) index, so using the index this way would make a
> warped kind of sense.  But I agree that it is ugly.
> 
> > If anything, I'd
> > like it if `check-attr' could just use the repository directly instead
> > of the index (or a work tree) in a bare repository.
> 
> I think the right thing to do is to put this functionality in a new
> ‘git ls’ command.  Maybe something like this:
> 
>  $ git ls --format='%p %a(crlf)' master -- '*.txt'
>  some/path/foo.txt crlf:input
>  some/path/bar.txt crlf
>  some/path/other.txt !crlf
>  yet/another/path.txt 
>  $

Well, that or make `git check-attr` support reading .gitattributes
from repository (from a corresponding tree object).

Unfortunately `git check-attr` doesn't have place to put revision...
well unless as a parameter:

  git check-attr [--cached|--tree <tree-ish>] <attr>... [--] <pathname>...

-- 
Jakub Narebski
Poland
ShadeHawk on #git