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

Re: git check-attr in bare repositories

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 30, 2010, 21:22 UTC
Message-ID
<20100330212222.GA11192@progeny.tock>
In-Reply-To
<19377.33747.838003.360864@winooski.ccs.neu.edu>
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 
 $

I can not promise I will find time before the weekend to work on it. I wouldn’t be unhappy if someone else gets to it first.

Thanks for the explanations. Jonathan

Previous: Eli BarzilayNext: Jakub Narebski
Message 7 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.