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 6, 2023, 17:52 UTC
- Message-ID
- <xmqq5y4nnq9b.fsf@gitster.g>
- In-Reply-To
- <2ba66542-9ae2-4b13-ae6b-f37dec6b72c7@app.fastmail.com>
"Kristoffer Haugsbakk" <code@khaugsbakk.name> writes:
Show 7 quoted lines
> But not with “worktree”: > > “ A repository can have zero (i.e. bare repository) or one or more > worktrees attached to it. ... > > Since this entry claims that “bare repository” and “zero worktrees” are > equivalent.
I wrote that "(i.e. bare repository)" in 2df5387e (glossary: describe "worktree", 2022-02-09) but did not mean that way.
A non-bare repository can reduce the number of its worktrees, but it cannot go below one, because the directory with working tree files and the .git/ subdirectory, i.e. its primary worktree, must exist for it to be a non-bare repository. Consequently a repository with zero worktree is by definition a bare repository.
But that does not have to mean all bare repositories can have no worktrees.