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

Re: The design of refs backends, linked worktrees and submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 19, 2017, 19:44 UTC
Message-ID
<xmqq8tq625ti.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACsJy8CHoroX2k9GqOFmXkvvPCPN4SBeCg+6aC2WSWNSKVmWQw@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> ... A bit worried about transactions though,
> because I think per-repo and per-worktree updates will be separated in
> two transactions. But that's probably ok because future backends, like
> lmdb, will have to go through the same route anyway.

If we have per-worktree ref-store, what can be done as a useful thing by future backends like lmdb may be to use the same single database to store shared and per-worktree refs, similar to the way Michael mentioned in his response to your message I am responding to, i.e.

    I kindof think that it would have been a better design to store the
    references for all linked worktrees in the main repository's ref-store.
    For example, the "bisect" refs for a worktree named "<name>" could have
    been stored under "refs/worktrees/<name>/bisect/*".

The current design is heavily influenced by how "contrib/workdir" lays things out, for the latter of which I take the blame X-<, but perhaps the files backend can be retrofitted to use that layout in the longer term?

Previous: Duy NguyenNext: Duy Nguyen
Message 5 of 6 in “The design of refs backends, linked worktrees and submodules”
  1. Duy NguyenJan 19, 2017
  2. Michael HaggertyJan 19, 2017
  3. Johannes SchindelinJan 19, 2017
  4. Duy NguyenJan 20, 2017
  5. Junio C HamanoJan 19, 2017
  6. Duy NguyenFeb 7, 2017

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.