From: Junio C Hamano Date: Wed, 01 Jun 2016 15:15:28 GMT Subject: Re: git gc and worktrees Message-ID: In-Reply-To: <574EA364.60408@alum.mit.edu> Michael Haggerty writes: > I think reference stores are going to need two distinct types of > reference iteration: one to iterate over the *logical* reference space > of a single repo or worktree, and one to find all *local* references > and/or reachability roots (e.g., when run within a linked repo). This is hard reason about without defining *logical* and *local*. For protecting necessary objects from pruning by anchoring them as "reachable", and for avoiding unnecessary object transfer by showing things via ".have" lines, we're better consider references and reflogs that do not appear in the namespace visible from the current worktree. I wanted to come up with an example of wanting to iterate over refs of the current worktree, but other than "what are my branches including HEAD?" I didn't think of anything interesting. > The current approach, where subtrees of the reference namespace > are pasted ad-hoc into each other partly by manhandling the > ref_cache and partly via the hack in `git_path()` is not, I think, > a very good long-term design. This I agree with. Thanks.