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

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

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 3, 2015, 14:03 UTC
Message-ID
<CACsJy8B6Fg-1haJZ_xMGk8Xy0zUpeOJYgRWKbZxy_RB11JfF7g@mail.gmail.com>
In-Reply-To
<CACsJy8Cx_PTehaeQgXxGaTNRF2DUSNqbBYPQ5gQ0BYGpz6kQvQ@mail.gmail.com>
On Mon, Aug 3, 2015 at 8:02 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Sat, Aug 1, 2015 at 10:59 AM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
>> 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

After re-reading some code, I think this invisible mapping on lookup is already done for our file-based ref backend. Take resolve_ref_unsafe_1 for example, the call strbuf_git_path() may return ".git/worktrees/foo/HEAD", not ".git/HEAD", given the input ref "HEAD". So ref names are already separated from where they are stored.

>> 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/*")?

My decision to hard code these paths may turn out a bad thing (it's common_list[] in path.c). Perhaps I should let the user extend them, but we will not allow to override a small subset of paths because that may break stuff horribly.

Show 6 quoted lines
>> It's all a bit frightening, frankly.
>
> I would think all work to make pluggable backends happen should allow
> us to do this kind of transparent mapping. We can add a new file-based
> backend with just this redirection, can't we? I haven't read the
> updated refs.c though, need to do it now..
-- 
Duy
Previous: Duy Nguyen
Message 15 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.