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

Re: RFC: Flat directory for notes, or fan-out? Both!

From
Jeff King <peff@peff.net>
Date
Feb 10, 2009, 12:18 UTC
Message-ID
<20090210121833.GC15491@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0902092200170.10279@pacific.mpi-cbg.de>
On Mon, Feb 09, 2009 at 10:12:06PM +0100, Johannes Schindelin wrote:
Show 6 quoted lines
> Shawn triggered some well needed thinking on my part about the notes 
> implementation.  At the moment, we have flat directory structure, and read 
> all of them in one go (when needed).
> 
> I think we should support that, because it is relatively easy to generate 
> that kind of trees for small-scale applications.

Hmm. Do we really care about how easy it is to generate? Are we expecting people to not use the command interface and instead check out a notes tree and start putting stuff into $commit/foo?

And if we are encouraging the dual possibilities, how do we handle the case of merging two trees with equivalent but differently-formatted content?

Imagine I have three users, A, B, and C, all collaborating on a project with notes. A and B use the "git notes" interface which generates a fan-out directory structure. C uses his own script that directly writes to the notes tree without fan-out.

Now let's imagine A, B, and C all write a note for commit X, and A pulls from the other two. When he pulls from B, there is a file-level conflict, and he decides that his note is better and resolves in his favor. But when he pulls from C, there is _no_ conflict, and now there are two notes for the same commit in his notes tree. You can give the multiple notes some sane semantics (one trumps the other, or they are a list, or whatever), but there is still an inconsistency: B's notes and C's notes behave differently. So now A has to start caring about how other people generate their notes.

The only two solutions I can think of are:
  - when A pulls notes, he does a specialized merge that normalizes the
    note trees
  - particular notes trees are specified as being in "fan out" or "not
    fan out" mode. But there is no place to specify that to enforce it.
-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 10 of 33 in “RFC: Flat directory for notes, or fan-out? Both!”
  1. Johannes SchindelinFeb 9, 2009
  2. Boyd Stephen Smith Jr.Feb 10, 2009
  3. Jeff KingFeb 10, 2009
  4. Boyd Stephen Smith Jr.Feb 11, 2009
  5. Linus TorvaldsFeb 11, 2009
  6. Sam VilainFeb 11, 2009
  7. Linus TorvaldsFeb 11, 2009
  8. Sam VilainFeb 11, 2009
  9. Johannes SchindelinFeb 11, 2009
  10. Jeff KingFeb 10, 2009
  11. Johannes SchindelinFeb 10, 2009
  12. Jeff KingFeb 10, 2009
  13. Johannes SchindelinFeb 10, 2009
  14. Junio C HamanoFeb 10, 2009
  15. Shawn O. PearceFeb 10, 2009
  16. Johannes SchindelinFeb 10, 2009
  17. Shawn O. PearceFeb 10, 2009
  18. Johannes SchindelinFeb 10, 2009
  19. Junio C HamanoFeb 10, 2009
  20. Shawn O. PearceFeb 10, 2009
  21. Johannes SchindelinFeb 10, 2009
  22. Thomas RastFeb 10, 2009
  23. Thomas RastFeb 10, 2009
  24. Junio C HamanoFeb 10, 2009
  25. Jeff KingFeb 11, 2009
  26. Johannes SchindelinFeb 11, 2009
  27. Junio C HamanoFeb 11, 2009
  28. Johannes SchindelinFeb 11, 2009
  29. Shawn O. PearceFeb 10, 2009
  30. Johannes SchindelinFeb 10, 2009
  31. Shawn O. PearceFeb 10, 2009
  32. Sam VilainFeb 11, 2009
  33. Sam VilainFeb 11, 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.