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

Re: [PATCH/RFC 0/2] bisect per-worktree

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Aug 1, 2015, 03:59 UTC
Message-ID
<55BC4438.8060709@alum.mit.edu>
In-Reply-To
<1438387012-29229-1-git-send-email-dturner@twopensource.com>
On 08/01/2015 01:56 AM, David Turner wrote:
Show 5 quoted lines
> This is RFC because I'm not sure why show-ref only works on refs/ (and
> whether it should learn to look in worktree-refs/).  I'm also not sure
> whether there are other changes I should make to refs.c to handle
> per-worktree refs; I basically did the simplest thing I could think of
> to start with.

It seems to me that adding a new top-level "worktree-refs" directory is pretty traumatic. Lots of people and tools will have made the assumption that all "normal" references live under "refs/".

Each worktree has a name, right? What if worktree-specific refs were stored under "refs/worktree/<name>/" or something? This would require the name to be a valid reference name component, but I think that is a prudent idea anyway.

Of course that doesn't answer the question: where should the refs for the main repository go? I suppose either in the current place, or maybe the main repository should have a name too (e.g. "main") and its references should be stored under "refs/worktree/main/".

These worktree-specific refs should presumably be deleted automatically when the worktree is deleted.

Either way, there's also the question of who should know how to find the worktree-specific references--the program that wants to access them, or should there be a secret invisible mapping that is done on lookup, and that knows the full list of references that want to be worktree-specific (for example, that in a linked worktree, "refs/bisect/*" should be silently redirected to "refs/worktree/<name>/bisect/*")?

It's all a bit frightening, frankly.
Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
Previous: David TurnerNext: Junio C Hamano
Message 4 of 15 in “bisect per-worktree”
  1. 0/2 bisect per-worktreeDavid Turner, Jul 31, 2015
  2. 1/2 refs: workree-refs/* become per-worktreeDavid Turner, Jul 31, 2015
  3. 2/2 bisect: make bisection refs per-worktreeDavid Turner, Jul 31, 2015
  4. Michael HaggertyAug 1, 2015
  5. Junio C HamanoAug 1, 2015
  6. David TurnerAug 1, 2015
  7. Michael HaggertyAug 1, 2015
  8. Junio C HamanoAug 2, 2015
  9. Duy NguyenAug 3, 2015
  10. David TurnerAug 3, 2015
  11. Junio C HamanoAug 3, 2015
  12. Duy NguyenAug 3, 2015
  13. David TurnerAug 3, 2015
  14. Duy NguyenAug 3, 2015
  15. Duy NguyenAug 3, 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.