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

`git check-attr' problems & questions

From
Eli Barzilay <eli@barzilay.org>
Date
Mar 26, 2010, 03:57 UTC
Message-ID
<m3iq8jn3ar.fsf@winooski.ccs.neu.edu>

I'm trying to use .gitattributes to use some custom properties that we have in an svn repository which is migrating to git, and there are some two big problems with it that I'm running into:

1. Looks like the path should always be the full path from the root,
   even if I'm currently in a subdirectory, so:
     cd $repo/foo/bar
     git check-attr foo -- some-file # doesn't work
     git check-attr foo -- foo/bar/some-file # works
   Worse, if I happen to have an attribute for a toplevel `foo' file,
   the first command produces that attribute.
2. I'm also trying to use an attribute on a hook script on the server
   (with the idea that email notifications are sent according to the
   set of modified files) -- but it looks like `git check-attr'
   doesn't work on a bare repository.  There's a "worse" part here
   too: instead of showing an error, it actually succeeds after
   showing that the attribute is "unspecified".

So my first question is -- am I missing something obvious? It almost looks like `check-attr' is intended only for low-level use...

Fixing the first problem seems like it would be easy with a quick shell script (maybe even with just an alias), but the second one is more troubling. Is there any way to do this on a bare repository without checking it out?

And the last question -- is there anything that does something like this customized email notifications that I'm trying to do? (That is: an attribute that determines recipients, then a `post-receive' hook that builds a list of modified files, grabs all the corresponding values of this attributes, and that's makes up the recipient list to notify.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Next: Jonathan Nieder
Message 1 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.