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 18, 2008, 13:54 UTC
Message-ID
<20081218135433.GA6706@coredump.intra.peff.net>
In-Reply-To
<5d46db230812170906h7fdcac03o60386504c8df1083@mail.gmail.com>
On Wed, Dec 17, 2008 at 11:06:15AM -0600, Govind Salinas wrote:
> Yes, I was thinking that this is the natural way to do things, save that I
> would be lazy loading the trees into a cache instead of caching them
> all up front.  This is one of the reasons that I think the fan out will
> help.

I was working under the assumption that you are going to do multiple note lookups. If you are, then the fan-out isn't really going to help, as you're going to end up pulling in all of the subtrees anyway. It helps some if you're only doing a single lookup, but I don't know if that is measurable.

Show 7 quoted lines
> Yes, I completely agree that I want it to have the same scheme as what
> git will use.  That is the reason I posted this here.  Since no method
> has been formally accepted (checked into master) I wanted to see if
> I could nudge things along.  I wasn't aware that you and Dscho had
> a (very similar) plan.  Please, if you guys are decided on the format
> then I can just go off and start working on it.  But it sounds like there
> isn't consensus yet.

This is probably not the answer you want, but I think the final design depends on some C experiments. For example, whether or not there should be fan-out depends on how it affects performance, which means we need to do at least partial implementations to compare. So it really is just waiting for somebody to sit down and do it.

> I like the overall plan, but I would suggest that --notes[=default] and
> --note-type=whatever would be a little friendlier and less error prone.

But keeping it as a single string means there is no ambiguity when you specify multiple notes at once. For example:

  git log \
    --note-filter='test:status == "fail" && importance > 3' \
    --pretty=format:%h%n%N(test:errors)
would do something like:
  foreach commit $C
    compare refs/notes/test:$C/status against the string "fail"
    compare refs/notes/default:$C/importance against the number 3
    if either don't match, skip the commit
    show the hash and the contents of refs/notes/test:$C/errors

and obviously that filter language is totally made up and we may or may not want to do something that complex. But my point is that we are defining a namespace of notes, and we want to be able to refer to a multiple fully qualified names.

-Peff
Previous: Govind SalinasNext: Johannes Schindelin
Message 10 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.