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

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
Previous: Jonathan NiederNext: Eli Barzilay
Message 8 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.