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

Re: Bug report - Can create worktrees from bare repo / such worktrees can fool is_bare_repository()

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 20, 2021, 16:20 UTC
Message-ID
<xmqq5yrjxn79.fsf@gitster.g>
In-Reply-To
<f39af047-d244-14be-4cd8-b6c3199545f3@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
> Thanks for this context of added responsibility. It seems a bit strange
> to require this, since it doesn't make any sense to have a bare worktree
> (at least not to me, feel free to elaborate on the need of such a
> situation).

Stepping back a bit, those who want to have two new worktrees attached to a single bare repository justify the wish by saying that neither of these two new worktrees should be the primary thing that they can lose to make the other inoperable, and having a dedicated "shared object and ref store" repository makes it more symmetric and safer by making it obvious which one is the precious thing to keep.

Wanting to create two new "bare repository lookalike" attached to a single bare repository might be defensible the same way.

Not that the current "git worktree" has readily-available features to create such a layout. If people who have worked on "worktree" did not see the possibility of needing such a layout, it is understandable that such features wouldn't have been designed yet.

Also not that I think that such a layout necessarily makes sense.
Previous: Eric Sunshine
Message 19 of 19 in “Bug report - Can create worktrees from bare repo / such worktrees can fool is_bare_repository()”
  1. Sean AllredDec 18, 2021
  2. rsbecker@nexbridge.comDec 18, 2021
  3. Sean AllredDec 18, 2021
  4. rsbecker@nexbridge.comDec 18, 2021
  5. Eric SunshineDec 19, 2021
  6. Sean AllredDec 19, 2021
  7. rsbecker@nexbridge.comDec 19, 2021
  8. Sean AllredDec 19, 2021
  9. rsbecker@nexbridge.comDec 19, 2021
  10. Eric SunshineDec 19, 2021
  11. Eric SunshineDec 19, 2021
  12. rsbecker@nexbridge.comDec 19, 2021
  13. Eric SunshineDec 20, 2021
  14. Eric SunshineDec 20, 2021
  15. Derrick StoleeDec 20, 2021
  16. Eric SunshineDec 20, 2021
  17. Derrick StoleeDec 20, 2021
  18. Eric SunshineDec 20, 2021
  19. Junio C HamanoDec 20, 2021

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.