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

Re: [PATCH 3/6] refs/files: skip creation of "refs/{heads,tags}" for worktrees

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 29, 2023, 10:35 UTC
Message-ID
<CAPig+cRWCFdVd_+By2T-sP58u22OcgDQogSS0UP5ZYYf2K5W_A@mail.gmail.com>
In-Reply-To
<3cf6ceb274d20ce76d0be65e4362a33579627052.1703754513.git.ps@pks.im>
On Fri, Dec 29, 2023 at 5:16 AM Patrick Steinhardt <ps@pks.im> wrote:
> The files ref backend will create both "refs/heads" and "refs/tags" in
> the Git directory. While this logic makes sense for normal repositories,
> it does not fo worktrees because those refs are "common" refs that would
> always be contained in the main repository's ref database.
s/fo/for/
(not worth a reroll)
Show 7 quoted lines
> Introduce a new flag telling the backend that it is expected to create a
> per-worktree ref database and skip creation of these dirs in the files
> backend when the flag is set. No other backends (currently) need
> worktree-specific logic, so this is the only required change to start
> creating per-worktree ref databases via `refs_init_db()`.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 7 of 21 in “worktree: initialize refdb via ref backends”
  1. 0/6 worktree: initialize refdb via ref backendsPatrick Steinhardt, Dec 28, 2023
  2. 1/6 refs: prepare `refs_init_db()` for initializing worktree refsPatrick Steinhardt, Dec 28, 2023
  3. 2/6 setup: move creation of "refs/" into the files backendPatrick Steinhardt, Dec 28, 2023
  4. Karthik NayakJan 2, 2024
  5. Patrick SteinhardtJan 3, 2024
  6. 3/6 refs/files: skip creation of "refs/{heads,tags}" for worktreesPatrick Steinhardt, Dec 28, 2023
  7. Eric SunshineDec 29, 2023
  8. 4/6 builtin/worktree: move setup of commondir file earlierPatrick Steinhardt, Dec 28, 2023
  9. 5/6 worktree: expose interface to look up worktree by namePatrick Steinhardt, Dec 28, 2023
  10. 6/6 builtin/worktree: create refdb via ref backendPatrick Steinhardt, Dec 28, 2023
  11. Junio C HamanoDec 28, 2023
  12. Patrick SteinhardtDec 28, 2023
  13. 0/6 worktree: initialize refdb via ref backendsPatrick Steinhardt, Jan 8, 2024
  14. 1/6 refs: prepare `refs_init_db()` for initializing worktree refsPatrick Steinhardt, Jan 8, 2024
  15. 2/6 setup: move creation of "refs/" into the files backendPatrick Steinhardt, Jan 8, 2024
  16. 3/6 refs/files: skip creation of "refs/{heads,tags}" for worktreesPatrick Steinhardt, Jan 8, 2024
  17. 4/6 builtin/worktree: move setup of commondir file earlierPatrick Steinhardt, Jan 8, 2024
  18. 5/6 worktree: expose interface to look up worktree by namePatrick Steinhardt, Jan 8, 2024
  19. 6/6 builtin/worktree: create refdb via ref backendPatrick Steinhardt, Jan 8, 2024
  20. Karthik NayakJan 16, 2024
  21. Junio C HamanoJan 16, 2024

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.