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

Re: `git check-attr' problems & questions

From
Eli Barzilay <eli@barzilay.org>
Date
Mar 29, 2010, 16:09 UTC
Message-ID
<19376.53419.640007.930897@winooski.ccs.neu.edu>
In-Reply-To
<19376.50971.397375.810974@winooski.ccs.neu.edu>
On Mar 29, Eli Barzilay wrote:
Show 9 quoted lines
> On Mar 27, Jonathan Nieder wrote:
> >  : "Usage: $0 commit check-attr-args" &&
> > 
> >  GIT_INDEX=tmp-index git read-tree --reset -i "$1" &&
> >  shift &&
> >  GIT_INDEX=tmp-index git check-attr "$@" &&
> >  rm tmp-index
> 
> I tried that, but it doesn't work.  (I used GIT_INDEX_FILE.)

In case I'm doing something wrong, here's a script that shows the problem that I have:

  #!/bin/sh
  rm -rf /tmp/test
  mkdir /tmp/test
  cd /tmp/test
  mkdir t
  cd t
  git init > /dev/null
  echo "Blah" > foo
  echo "foo x=y" > .gitattributes
  git add foo .gitattributes
  git commit -m "stuff" > /dev/null
  echo -n "check-attr in a working directory: "
  git check-attr x foo
  cd ..
  git clone --bare t > /dev/null
  cd t.git
  git read-tree --reset -i master
  echo -n "check-attr in a bare repository:   "
  git check-attr x foo
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Previous: Eli BarzilayNext: Jonathan Nieder
Message 4 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.