git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git check-attr in bare repositories

From
Eli Barzilay <eli@barzilay.org>
Date
Mar 31, 2010, 03:15 UTC
Message-ID
<19378.48750.465977.853886@winooski.ccs.neu.edu>
In-Reply-To
<20100330212222.GA11192@progeny.tock>
On Mar 30, Jonathan Nieder wrote:
Show 13 quoted lines
> 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:
Show 8 quoted lines
> 
> 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!
Previous: Jakub NarebskiNext: Jonathan Nieder
Message 9 of 12 in “`git check-attr' problems & questions”
  1. Eli BarzilayMar 26, 2010
  2. Jonathan NiederMar 28, 2010
  3. Eli BarzilayMar 29, 2010
  4. Eli BarzilayMar 29, 2010
  5. git check-attr in bare repositoriesJonathan Nieder, Mar 29, 2010
  6. Eli BarzilayMar 30, 2010
  7. Jonathan NiederMar 30, 2010
  8. Jakub NarebskiMar 30, 2010
  9. Eli BarzilayMar 31, 2010
  10. Carrying over attributes when moving filesJonathan Nieder, Mar 30, 2010
  11. Eli BarzilayMar 31, 2010
  12. Junio C HamanoMar 31, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.