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

Re: Git Notes idea.

From
Jeff King <peff@peff.net>
Date
Dec 17, 2008, 09:45 UTC
Message-ID
<20081217094528.GA18492@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0812170003540.14632@racer>
On Wed, Dec 17, 2008 at 12:48:02AM +0100, Johannes Schindelin wrote:
> > Perhaps I am missing something, how is it a linear search?
> 
> Yes, you are missing what I wrote in the original thread: tree objects 
> must be read in a forward direction, one by one.

Thanks, that was a nice writeup of what was discussed at the GitTogether.

> Peff's very cute idea was to decouple that process from the per-commit 
> procedure, and basically make it a one-time cost (per Git call, and only 
> when notes were asked for).

To be fair, it was not my cute idea, but somebody else's (I think David Reiss). I just coded it quickly because somebody was talking about iPhones or something. :)

> To the contrary.  When I rebase, the tree _does_ change, otherwise I
> would have rebased onto something that had the same original tree as
> my rebase-base to begin with, which would make the rebase rather
> pointless.

Another fun option would be to put notes on patch-ids. That would of course be horrifically slow to look up, but would survive many cherry-picks and rebases (but not all, of course).

I don't know if that is useful or not, but I don't see any reason why the discussed implementation would forbid it (somebody would just have to implement the lookups at a useful spot).

> > On naming.  I strongly support a ref/notes/sha1/sha1 approach.
> I think you meant refs/notes:<first byte in hex>/<rest of bytes>/<some
> arbitrary SHA-1>?

You seem to be in favor of the fan-out. Out of curiosity, did you ever do numbers on whether the fan-out is actually helpful?

> I am rather supporting refs/nots:<first byte in hex>/<rest of bytes>
> being either a blob, or a tree containing human readable tags, such as
> "bugfix" or "review" or some such.

Yes, I am in favor of the "tree or blob" idea, too. I want this to not just be about "I am a person writing a note" but "arbitrary data attached to an object after it has been created". And that means thinking up front about managing the namespace.

-Peff
Previous: Johannes SchindelinNext: Petr Baudis
Message 6 of 41 in “Git Notes idea.”
  1. Govind SalinasDec 16, 2008
  2. Jeff KingDec 16, 2008
  3. Jeff KingDec 16, 2008
  4. Govind SalinasDec 16, 2008
  5. Johannes SchindelinDec 16, 2008
  6. Jeff KingDec 17, 2008
  7. Petr BaudisDec 17, 2008
  8. Jeff KingDec 17, 2008
  9. Govind SalinasDec 17, 2008
  10. Jeff KingDec 18, 2008
  11. rebasing commits that have notes, was Re: Git Notes idea.Johannes Schindelin, Dec 17, 2008
  12. Johan HerlandDec 17, 2008
  13. Stephan BeyerDec 17, 2008
  14. 0/4 Notes reloadedJohannes Schindelin, Dec 19, 2008
  15. 1/4 Introduce commit notesJohannes Schindelin, Dec 19, 2008
  16. Jeff KingDec 20, 2008
  17. Robin RosenbergDec 20, 2008
  18. Jeff KingDec 20, 2008
  19. Junio C HamanoDec 20, 2008
  20. Jeff KingDec 20, 2008
  21. Junio C HamanoDec 20, 2008
  22. 0/4 Notes, reloadedJohannes Schindelin, Dec 20, 2008
  23. 1/4 Introduce commit notesJohannes Schindelin, Dec 20, 2008
  24. 2/4 Add a script to edit/inspect notesJohannes Schindelin, Dec 20, 2008
  25. 3/4 Speed up git notes lookupJohannes Schindelin, Dec 20, 2008
  26. 4/4 Add an expensive test for git-notesJohannes Schindelin, Dec 20, 2008
  27. 2/4 Add a script to edit/inspect notesJohannes Schindelin, Dec 19, 2008
  28. 3/4 Speed up git notes lookupJohannes Schindelin, Dec 19, 2008
  29. 4/4 Add an expensive test for git-notesJohannes Schindelin, Dec 19, 2008
  30. Boyd Stephen Smith Jr.Dec 19, 2008
  31. Johannes SchindelinDec 20, 2008
  32. Jeff KingDec 17, 2008
  33. Johannes SchindelinDec 17, 2008
  34. Junio C HamanoDec 17, 2008
  35. Johannes SchindelinDec 18, 2008
  36. Govind SalinasDec 19, 2008
  37. Govind SalinasDec 19, 2008
  38. Govind SalinasDec 19, 2008
  39. Jeff KingDec 19, 2008
  40. Govind SalinasDec 19, 2008
  41. Jeff KingDec 20, 2008

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.