Re: git check-attr in bare repositories
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Mar 30, 2010, 21:39 UTC
- Message-ID
- <m3iq8dij6r.fsf@localhost.localdomain>
- In-Reply-To
- <20100330212222.GA11192@progeny.tock>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 22 quoted lines
> 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