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 29, 2015, 05:00 UTC
Message-ID
<xmqq4mknblt0.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CALKQrgff1AKBCsdFBTcthMb61gQwb4CjH=P7TPfpy1unMJ2_=g@mail.gmail.com>
Johan Herland <johan@herland.net> writes:
Show 9 quoted lines
> On Wed, Jul 29, 2015 at 4:00 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
>> So doing the absolute minimum, leaving the "now what can we do to
>> improve notes-merge process?" outside the scope of the topic.
>
> That's exactly what I was also trying to do: David's topic should not
> have to deal with NOTES_MERGE_* at all. Simply leave it all as
> something that belongs in $GIT_COMMON_DIR, and let's solve concurrent
> unrelated notes merges as a wholly independent, separate topic.

Here, it perhaps is showing that you are unfamiliar with the linked worktree topic.

Things directly under .git/, like HEAD, MERGE_HEAD, etc., are per worktree (i.e. not shared across working trees). You have to work to make them shared, i.e. per repo. David's earlier one downcased them while still keeing them directly under .git/ but I think it is ugly and in general a wrong way to mark what is shared and what is per worktree. E.g. index is not shared, even though the name is all lowercase.

You will be updating that mechanism when you truly make the notes-merge a per refs/notes/* ref thing (not per repo, not per worktree). Perhaps you will use refs/notes-merge/$foo that is shared across worktrees as the replacement for NOTES_MERGE_REF that currently is used to merge into refs/notes/$foo, or something like that, to pursue your "per ref" goal. At that point, NOTES_MERGE_REF based design needs to be scrapped anyway; it should not matter if NOTES_MERGE_REF is per worktree (not shared) or per repo (shared) in the meantime.

Doing absolute minimum means that $GIT_DIR/NOTES_MERGE_REF should be left per worktree, like MERGE_HEAD, etc., without doing anything like downcasing or moving it under refs/notes-merge/ (which I think is a better way to make it shared, if we wanted to), which is additional special casing that will be a wasted effort that would not matter in the end result.

Previous: Johan HerlandNext: Johan Herland
Message 24 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.