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

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

From
Johan Herland <johan@herland.net>
Date
Jul 29, 2015, 01:24 UTC
Message-ID
<CALKQrgeevWUE6tdPLWRKzRQLj5v5_9NyFqJCBraRArrZB-QNyw@mail.gmail.com>
In-Reply-To
<55B824BD.8000003@alum.mit.edu>
On Wed, Jul 29, 2015 at 2:56 AM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 6 quoted lines
> Johan Herland <johan@herland.net> writes:
>> Here is where we start to differ. I would say that starting a notes
>> merge is completely unrelated to your worktree. Consider this:
>
> It sounds like what a notes merge really wants is a new linked worktree
> that has branch refs/notes/foo checked out:

Yes, almost. There are some complications with the concept of "checking out" a notes tree:

 - The notes tree fanout must be flattened (so that when merging two
note trees with different fanout, conflicting notes (e.g. deadbeef...
and de/adbeef....) are turned into a file-level conflict in the notes
merge worktree (i.e. contents with conflict markers in
.git/NOTES_MERGE_WORKTREE/deadbeef...).
 - Notes trees may be very large (e.g. one note per commit for the
entire project history), so we want to avoid checking out as many
notes as possible. Currently we only checkout the notes that actually
do conflict, and keep the rest referenced from NOTES_MERGE_PARTIAL.
Show 8 quoted lines
> * This would allow multiple notes merges to take place at the same time
> provided they target different merge references.
>
> * This would prevent multiple notes merges to the same notes reference
> at the same time by the same mechanism that prevents the same branch
> from being checked out in two linked worktrees at the same time.
>
> It's just a thought; I have no idea whether it is practical...

I'm not sure whether it's worth trying to reuse the same linked worktree mechanism for notes trees, when (a) the concept of "checking out" a notes tree is so different, as explained above, and (b) currently the only use case for a notes worktree is during a notes merge.

...Johan
Show 6 quoted lines
> Michael
>
> --
> Michael Haggerty
> mhagger@alum.mit.edu
>
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Jacob KellerNext: Junio C Hamano
Message 20 of 41 in “pseudorefs”
  1. 0/6 pseudorefsDavid Turner, Jul 28, 2015
  2. 1/6 refs: Introduce pseudoref and per-worktree ref conceptsDavid Turner, Jul 28, 2015
  3. 2/6 notes: replace pseudorefs with real refsDavid Turner, Jul 28, 2015
  4. Junio C HamanoJul 28, 2015
  5. David TurnerJul 28, 2015
  6. Junio C HamanoJul 28, 2015
  7. notes: handle multiple worktreesDavid Turner, Jul 28, 2015
  8. David TurnerJul 28, 2015
  9. Junio C HamanoJul 28, 2015
  10. Junio C HamanoJul 28, 2015
  11. Johan HerlandJul 28, 2015
  12. Duy NguyenAug 3, 2015
  13. Eric SunshineJul 28, 2015
  14. Johan HerlandJul 28, 2015
  15. Junio C HamanoJul 28, 2015
  16. Johan HerlandJul 28, 2015
  17. Junio C HamanoJul 29, 2015
  18. Michael HaggertyJul 29, 2015
  19. Jacob KellerJul 29, 2015
  20. Johan HerlandJul 29, 2015
  21. Junio C HamanoJul 29, 2015
  22. Junio C HamanoJul 29, 2015
  23. Johan HerlandJul 29, 2015
  24. Junio C HamanoJul 29, 2015
  25. Johan HerlandJul 29, 2015
  26. Junio C HamanoJul 29, 2015
  27. Johan HerlandJul 29, 2015
  28. Junio C HamanoJul 29, 2015
  29. Junio C HamanoJul 29, 2015
  30. Johan HerlandJul 30, 2015
  31. Junio C HamanoJul 30, 2015
  32. Junio C HamanoJul 29, 2015
  33. Johan HerlandJul 29, 2015
  34. 3/6 refs: add ref_type functionDavid Turner, Jul 28, 2015
  35. Eric SunshineJul 29, 2015
  36. 4/6 pseudorefs: create and use pseudoref update and delete functionsDavid Turner, Jul 28, 2015
  37. Eric SunshineJul 29, 2015
  38. 5/6 rebase: use update_refDavid Turner, Jul 28, 2015
  39. 6/6 sequencer: replace write_cherry_pick_head with update_refDavid Turner, Jul 28, 2015
  40. Junio C HamanoJul 28, 2015
  41. David TurnerJul 28, 2015

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.