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
Junio C Hamano <gitster@pobox.com>
Date
Jul 30, 2015, 16:24 UTC
Message-ID
<xmqqoait7gwt.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CALKQrgeLMWCKzEnPfv_WeL1-=eDQYtEk=tOejSG4JwPaoEGt=Q@mail.gmail.com>
Johan Herland <johan@herland.net> writes:
Show 7 quoted lines
>> Actually, the name "linked worktree" is probably a misnomer.
>> ...
> Makes sense, although currently, IINM, those multiple $GIT_DIRs must
> be associated with strictly different branches, which is completely
> unrelated to the desired notes-merge restriction (which applies to
> notes refs - not branches). But this has been discussed to death,
> already.

Yeah, when we enhance "linked worktree" to make it easier to create "bare worktree", we'd need to make sure it is easy to make them in the detached HEAD state, i.e. not tied to any particular branch.

Show 13 quoted lines
>> The user could attempt to start different notes merges in her
>> multiple $GIT_DIRs.  The question is to what degree we want to
>> support her.
>>
>> Is it sufficient to have these per $GIT_DIR, when the user has two
>> $GIT_DIRs connected to the same repository and wants to do two
>> "notes merge" acting on different ref in refs/notes/*?  Or are there
>> some other states in the shared part kept, which would be stomped on
>> by simultaneously running "notes merge" instances in different
>> $GIT_DIRs, that make this not to work?  Any other problems in the
>> remainder of the current implementation of "notes merge"?
>
> Still, I believe the answer is "No".
Good.  So the following would be a viable way forward.
Show 9 quoted lines
>> But if there isn't, "[PATCH] notes: handle multiple worktrees" is
>> the absolute minimum thing we could
>> do to make "notes merge" usable by making sure that the user does
>> not attempt merging the same refs/notes/commits in two different
>> places.
>
> Sure. There's no point in delaying a patch that works well in practice
> just because I have a delusion of a theoretically cleaner solution
> that won't make any difference in practice.

I think the part of that patch that refactors the mechanism to notice and disallow symrefs pointing at the same thing (with various tweaks suggested during the review) is a good idea in the longer term. If we were to switch to a "you can do multiple notes merges inside a single repository without any additional linked worktree" paradigm in the future, we would not want (or need) to use that "avoid pointing this symref to the same thing" code for notes merge codepath, but that is not something we need to decide now.

Previous: Johan HerlandNext: Junio C Hamano
Message 31 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.