On Mar 30, Jonathan Nieder wrote: > Eli Barzilay wrote: > > 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 This looks useful, but it has a problem of being lower level than `check-attr' in the sense that you need to parse this output. On Mar 30, Jakub Narebski wrote: > > 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>... This looks like a better way to have what I need from it... It also looks useful for other uses -- for example, an attribute that is used by a hook to specify that some file should not be deleted (so the hook needs to look at the value before the commit). (But in any case, I'd be happy if there was a way to make it read the contents of a (temporary) index.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html