Re: [PATCH 00/30] [RFC] extensions.refFormat and packed-refs v2 file format
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Nov 30, 2022, 15:38 UTC
- Message-ID
- <0e3ab2bb-68ed-8e77-ac0b-afeb5ca88def@dunelm.org.uk>
- In-Reply-To
- <f1c45bd5-692e-85db-90c3-c516003f47e5@github.com>
Hi Stolee
On 30/11/2022 15:16, Derrick Stolee wrote:
Show 15 quoted lines
> On 11/28/2022 1:56 PM, Han-Wen Nienhuys wrote: >> * Worktrees and the main repository have a separate view of the ref >> namespace. This is not explicit in the ref backend API, and there is a >> technical limitation that the packed-refs file cannot be in a >> worktree. This means that worktrees will always continue to use >> loose-ref storage if you only extend the packed-refs backend. > > If I'm understanding it correctly [1], only the special refs (like HEAD or > REBASE_HEAD) are worktree-specific, and all refs under "refs/*" are > repository-scoped. I don't actually think of those special refs as "loose" > refs and thus they should still work under the "only packed-refs" value > for extensions.refFormat. I should definitely cover this in the > documentation, though. Also, [1] probably needs updating because it calls > HEAD a pseudo ref even though it explicitly is not [2]. >
> [1] https://git-scm.com/docs/git-worktree#_refs > [2] https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpseudorefapseudoref
Unfortunately I think it is a little messier than that (see refs.c:is_per_worktree_ref()). refs/bisect/*, refs/rewritten/* and refs/worktree/* are all worktree specific.
Best Wishes
Phillip