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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 1, 2015, 05:12 UTC
Message-ID
<CAPc5daVnfit8pkjc2HCSn0erW-q++We8gx8tPsb_ptd5H+CpJg@mail.gmail.com>
In-Reply-To
<55BC4438.8060709@alum.mit.edu>
On Fri, Jul 31, 2015 at 8:59 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 6 quoted lines
>
> 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/".
> ...
> It's all a bit frightening, frankly.

I actually feel the prospect of pluggable ref backend more frightening, frankly ;-). These bisect refs are just like FETCH_HEAD and MERGE_HEAD, not about the primary purpose of the "repository" to grow the history of refs (branches), but about ephemeral pointers into the history used to help keep track of what is being done in the worktree upstairs. There is no need for these to be visible across worktrees. If we use the real refs that are grobal in the repository (as opposed to per-worktree ones), we would hit the backend databas with transactions to update these ephemeral things, which somehow makes me feel stupid.

I wish we could just make refs/bisect/* (or whatever the current bisect code uses) automatically per worktree. I know David dismissed it saying that the current code is not set up to allow it easily, but is it really a fundamental limitation, or is it just a matter of coding a few more dozens of lines?

If we can keep using the same location under refs/ and transparently make them appear per-worktree, "what is the name of the main one?", and "do we even need to call the one and the only one 'main'?" will automatically disappear. Of course, "git bisect" and "gitk --bisect" does not have to change if we go that route.

And there will not be any backward compatibility worries. If you are not using multiple worktrees, you will see them as refs/bisect/*, just at the same location as you are familiar with.

Previous: Michael HaggertyNext: David Turner
Message 5 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.