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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2010, 20:25 UTC
Message-ID
<7v8wb4aj4m.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100207193320.GB3185@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Or perhaps you would not even want to do a tree-merge between notes at
> all, and would rather see a conflict if two people noted two different
> trees.

I've been thinking about the merge issues, and am starting to suspect that we might want a merge strategy quite drastically different even for blob cases. That is one of the reasons why I don't want to see us muddy the issues by introducing even more complex "tree" case.

Anybody working in the same project can start 'notes' tree with his or her own root. That is the normal use case for annotating commits for your own use. For merges inside the history of primary contents that people try to collaborate to advance, three-way merge pivoting on a common ancestor is a natural way to reach a satisfactory result. In notes namespace, on the other hand, the norm is to simply overlay the notes trees, adjusting for the fan-out. You annotated that commit I was not interested in, while I annotated this commit you weren't interested in. We have our notes in the end result, and both of us are happy. If we happen to have annotated the same commit without knowing what the other was doing, then there is no sane consolidation---in the most typical case, we would want to keep both, perhaps concatenating them together. Textual merge becomes the exception that triggers two "notes" histories happened to have forked from the same root somehow.

And for that most typical use case, I suspect even the current "notes on any and all commits for a single purpose are thrown into a one _bag_ that is a notes tree, and the growth of that bag is made into a history" model captures sets of notes that is too wide.

Suppose Alice, Bob and I are involved in a project, and we annotate commits for some shared purpose (say, tracking regressions). Alice and Bob may independently annotate overlapping set of commits (and hopefully they have shared root for their notes history as they are collaborating), and they may even be working together on the same issue, but I may not be involved in the area. What happens when I pull from Alice and Bob and get conflicts in notes they produced, especially the only reason I was interested was because they have new things to say about commits that I am interested in?

You can end up with conflicts in areas you are not familiar with but Alice and Bob are in charge of even in the primary content space, but there is a fundamental difference of this type of conflict in the notes space, I think. The set of contents in the primary content space are supposed to make a consistent whole, and there is a topic branch workflow to partition the work to allow me to easily kick the merge back to them (i.e. I can tell Alice and Bob to resolve the conflicts between themselves and trust that what they do between them do not touch outside of their area) without getting blocked. I don't see a clear workflow to resolve this in the notes space, especially with the set of operations the current "git notes" (and obvious and straightforward enhancements of what it does). At least not yet.

It's like "keeping track of /etc" (or "your home directory"). It is a misguided thing to do because you are throwing in records of the states of totally unrelated things into a single history (e.g. "Why does it matter I added new user frotz to /etc/passwd before I futzed with my sendmail configuration? ---It shouldn't matter; there shouldn't be ancestry relationships between these two changes"). I somehow feel that keeping track of the "growth of the bag of annotations to any and all commits" in a single history may be making the same mistake.

Previous: Jeff KingNext: Steven E. Harris
Message 10 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.