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

Re: [PATCHv4 08/12] Teach the notes lookup code to parse notes trees with various fanout schemes

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 27, 2009, 10:42 UTC
Message-ID
<alpine.DEB.1.00.0908271139520.7562@intel-tinevez-2-302>
In-Reply-To
<7v7hwp6ebb.fsf@alter.siamese.dyndns.org>
Hi,
On Wed, 26 Aug 2009, Junio C Hamano wrote:
Show 45 quoted lines
> Johan Herland <johan@herland.net> writes:
> 
> > The semantics used when parsing notes trees (with regards to fanout subtrees)
> > follow Dscho's proposal fairly closely:
> > - No concatenation/merging of notes is performed. If there are several notes
> >   objects referencing a given commit, only one of those objects are used.
> > - If a notes object for a given commit is present in the "root" notes tree,
> >   no subtrees are consulted; the object in the root tree is used directly.
> > - If there are more than one subtree that prefix-matches the given commit,
> >   only the subtree with the longest matching prefix is consulted. This
> >   means that if the given commit is e.g. "deadbeef", and the notes tree have
> >   subtrees "de" and "dead", then the following paths in the notes tree are
> >   searched: "deadbeef", "dead/beef". Note that "de/adbeef" is NOT searched.
> > - Fanout directories (subtrees) must references a whole number of bytes
> >   from the SHA1 sum they subdivide. E.g. subtrees "dead" and "de" are
> >   acceptable; "d" and "dea" are not.
> > - Multiple levels of fanout are allowed. All the above rules apply
> >   recursively. E.g. "de/adbeef" is preferred over "de/adbe/ef", etc.
> 
> If I am reading this correctly, the earlier parts of the series were
> aiming to let multiple people to add notes to the same commit more or less
> uncordinated while still allowing to merge them sensibly, but now such a
> workflow becomes impossible with this change.  
> 
> The above claims notes trees with different levels of fan-out are allowed,
> but what it really means is that merging notes trees with different levels
> of fan-out will produce a useless result that records notes for the same
> commit in different blobs all over the notes tree, and asking the notes
> mechanism to give the notes for one commit will give only one piece that
> originates in the tree whose creator happened to have used the longest
> prefix while ignoring all others.  It may _allow_ such a layout, but how
> would such semantics be useful in the first place?
> 
> I suspect that I am missing something but my gut feeling is that this
> change turns an interesting hack (even though it might be expensive) into
> a hack that is not useful at all in the real world, without some order,
> discipline, or guideline is applied.
> 
> What's the recommended way to work with this system from the end user's
> point of view in a distirbuted environment?  Somebody up in the project is
> supposed to decide what fan-out is to be used for the whole project and
> everybody should follow that structure?  If a participant in the project
> forgets that rule (or makes a mistake), a notes tree that mistakenly
> merges his notes tree becomes practically useless?  If so, perhaps we
> would need a mechanism to avoid such a mistake from happening?
Hmm...

Maybe you're right (and mugwump was right all along) that _all_ matching notes should be shown...

Ciao, Dscho

Previous: Johan HerlandNext: Johan Herland
Message 31 of 38 in “[PATCHv4 00/12] git notes”
  1. Johan HerlandAug 27, 2009
  2. 01/12 Introduce commit notesJohan Herland, Aug 27, 2009
  3. 02/12 Add a script to edit/inspect notesJohan Herland, Aug 27, 2009
  4. 03/12 Speed up git notes lookupJohan Herland, Aug 27, 2009
  5. 04/12 Add an expensive test for git-notesJohan Herland, Aug 27, 2009
  6. 05/12 Teach "-m <msg>" and "-F <file>" to "git notes edit"Johan Herland, Aug 27, 2009
  7. 06/12 fast-import: Add support for importing commit notesJohan Herland, Aug 27, 2009
  8. 07/12 t3302-notes-index-expensive: Speed up create_repo()Johan Herland, Aug 27, 2009
  9. 08/12 Teach the notes lookup code to parse notes trees with various fanout schemesJohan Herland, Aug 27, 2009
  10. Junio C HamanoAug 27, 2009
  11. Johan HerlandAug 27, 2009
  12. Johannes SchindelinAug 27, 2009
  13. Junio C HamanoAug 27, 2009
  14. Johannes SchindelinAug 28, 2009
  15. Junio C HamanoAug 27, 2009
  16. Shawn O. PearceAug 27, 2009
  17. Junio C HamanoAug 27, 2009
  18. Johan HerlandAug 27, 2009
  19. Jeff KingAug 27, 2009
  20. Junio C HamanoAug 28, 2009
  21. Sverre RabbelierAug 28, 2009
  22. Junio C HamanoAug 28, 2009
  23. Sverre RabbelierAug 28, 2009
  24. Junio C HamanoAug 28, 2009
  25. Sverre RabbelierAug 28, 2009
  26. Junio C HamanoAug 28, 2009
  27. Johannes SchindelinAug 28, 2009
  28. Johan HerlandAug 28, 2009
  29. Johannes SchindelinAug 28, 2009
  30. Johan HerlandAug 28, 2009
  31. Johannes SchindelinAug 27, 2009
  32. 09/12 Selftests verifying semantics when loading notes trees with various fanoutsJohan Herland, Aug 27, 2009
  33. 10/12 notes.c: Implement simple memory pooling of leaf nodesJohan Herland, Aug 27, 2009
  34. Alex RiesenAug 27, 2009
  35. Johan HerlandAug 27, 2009
  36. Johan HerlandAug 27, 2009
  37. 11/12 Add flags to get_commit_notes() to control the format of the note stringJohan Herland, Aug 27, 2009
  38. 12/12 Add '%N'-format for pretty-printing commit notesJohan Herland, Aug 27, 2009

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.