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

Re: Is "bare"ness in the context of multiple worktrees weird? Bitmap error in git gc.

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 7, 2023, 18:23 UTC
Message-ID
<xmqqv8clkfli.fsf@gitster.g>
In-Reply-To
<d59a97e7-81fd-472b-9a18-32d993f8c1c8@app.fastmail.com>
"Kristoffer Haugsbakk" <code@khaugsbakk.name> writes:
>> 	fatal: '../there' is a main working tree.
>
> This gives the same error if `there` is a bare repository. Is that
> intended?

I do not think so. The above is from "git worktree remove" and the candidates to be removed is listed by "git worktree list". I do not know if it is sensible to include the bare repository that the worktrees are attached to in the "list" output, and I do not think it makes sense to accept the path to the directory that is such a bare repository and let the code proceed that far. It should just reject it saying it is *not* a worktree.

> PS: Is it correct that the error message says “main working tree” instead
> of “main worktree”? (See cc73385cf6 (worktree remove: new command,
> 2018-02-12.) I was thinking of spelunking the history further but thought
> that I would quickly ask in case I'm missing something obvious.

My understanding is that "working tree" refers to what "git checkout" would give you to your "make" and compilers. The "worktree" is a mechanism to allow you to have multiple "working tree"s that are connected to a single repository (be it a bare or a non-bare one).

Show 8 quoted lines
> Certainly. But although this looks like it completely describes everything
> that you want, I still think it is good to explicitly mention something
> like:
>
>   “ Note that a bare repository may have ...
>
> Since although this can certainly be inferred from the text, it's good to
> have some redundancy when it comes to non-obvious cases.
That is fine.

I think I've already said everything that I think should be in the final text, and I do not mind if there are anything extra for helping new readers that may be more than absolute minimum.

Thanks.
Previous: Kristoffer HaugsbakkNext: Junio C Hamano
Message 19 of 31 in “Is "bare"ness in the context of multiple worktrees weird? Bitmap error in git gc.”
  1. Tao KlerksSep 4, 2023
  2. Tao KlerksSep 4, 2023
  3. Tao KlerksSep 4, 2023
  4. Kristoffer HaugsbakkSep 4, 2023
  5. Kristoffer HaugsbakkSep 4, 2023
  6. Eric SunshineSep 5, 2023
  7. Kristoffer HaugsbakkSep 6, 2023
  8. Sergey OrganovSep 6, 2023
  9. Kristoffer HaugsbakkSep 6, 2023
  10. Tao KlerksSep 6, 2023
  11. Junio C HamanoSep 6, 2023
  12. Sergey OrganovSep 6, 2023
  13. Junio C HamanoSep 6, 2023
  14. Sergey OrganovSep 6, 2023
  15. Tao KlerksSep 7, 2023
  16. Sergey OrganovSep 7, 2023
  17. Kristoffer HaugsbakkSep 7, 2023
  18. Kristoffer HaugsbakkSep 7, 2023
  19. Junio C HamanoSep 7, 2023
  20. Junio C HamanoSep 6, 2023
  21. Kristoffer HaugsbakkSep 6, 2023
  22. Junio C HamanoSep 6, 2023
  23. Sergey OrganovSep 6, 2023
  24. Tao KlerksSep 5, 2023
  25. Eric SunshineSep 5, 2023
  26. Junio C HamanoSep 5, 2023
  27. Eric SunshineSep 5, 2023
  28. Junio C HamanoSep 5, 2023
  29. Tao KlerksSep 5, 2023
  30. Kristoffer HaugsbakkSep 6, 2023
  31. Tao KlerksSep 5, 2023

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.