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

A generalization of git notes from blobs to trees - git metadata?

From
Jon Seymour <jon.seymour@gmail.com>
Date
Feb 6, 2010, 13:32 UTC
Message-ID
<2cfc40321002060532g4d22dd4dx403bf312708e1424@mail.gmail.com>
git notes is a nice innovation - well done to all those involved.

Has consideration ever been given to generalizing the concept to allow note (or more correctly - metadata) trees with arbitrary sha1s?

For example, suppose you had reason to cache the distribution that resulted from the build of a particular commit, then it'd be nice to be able to do this using a notes like mechanism.

    git metadata import foo-1.1.0 dist ~/foo/dist

would create a git tree from the contents of ~/foo/dist and then bind it to meta item called dist associated with the sha1 corresponding to foo-1.1.0

To retrieve the contents of the previous build, you'd do something like
   get metadata export foo-1.1.0 dist /tmp/foo-1.1.0

This would find the metadata tree associated with foo-1.1.0, extract the dist subtree from that tree and write it to disk at /tmp/foo-1.1.0

I've used build outputs as an example here, but really it needn't be limited to that. I can see this facility would be useful for any kind of annotation or derived result that is more complex than a single text blob. Metadata trees in combination with a name spacing technique, could be used to store arbitrary metadata created by an arbitrary set of tools to arbitrary SHA1 objects.

jon.
Next: Johan Herland
Message 1 of 19 in “A generalization of git notes from blobs to trees - git metadata?”
  1. Jon SeymourFeb 6, 2010
  2. Johan HerlandFeb 7, 2010
  3. Junio C HamanoFeb 7, 2010
  4. Jeff KingFeb 7, 2010
  5. Jon SeymourFeb 7, 2010
  6. Jakub NarebskiFeb 7, 2010
  7. Jon SeymourFeb 7, 2010
  8. Jon SeymourFeb 7, 2010
  9. Jeff KingFeb 7, 2010
  10. Junio C HamanoFeb 7, 2010
  11. Steven E. HarrisFeb 8, 2010
  12. Jeff KingFeb 10, 2010
  13. Junio C HamanoFeb 10, 2010
  14. Jeff KingFeb 10, 2010
  15. Junio C HamanoFeb 7, 2010
  16. Jeff KingFeb 7, 2010
  17. Johan HerlandFeb 7, 2010
  18. Jon SeymourFeb 7, 2010
  19. Jon SeymourFeb 7, 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.