Re: [BUG] worktree local refs weirdness
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 7, 2019, 09:46 UTC
- Message-ID
- <CACsJy8CrSGQt=_RK8cwc3AW_+gfGLf_M5UKAmjMZrm43Qu3Z8Q@mail.gmail.com>
- In-Reply-To
- <ec707cbb-96e8-f26f-3d69-b69d29b31737@gmail.com>
On Thu, Mar 7, 2019 at 4:38 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 14 quoted lines
> > On 06/03/2019 15:57, Phillip Wood wrote: > > When it is run in a worktree 'git for-each-ref' only seems to show refs > > under refs/rewritten if that directory also exists under $GIT_COMMON_DIR > > even though they are local to the worktree. > > > > Initially I thought this was due to $GIT_COMMON_DIR pointing to a bare > > repo, but that is not the case. However while writing a test case which > > cloned to a bare repo I noticed it was listing a ref for the HEAD of a > > worktree in the repo I had cloned from, not the clone itself. > > Ignore that last paragraph, it's just showing the branch that got > created when the worktree was created. The last part of the script is > redundant, I've updated it below
Thanks for the test script. I could reproduce it and I think I see the problem (update-ref creates per-worktree refs even though refs/rewritten should be per-repo). Working on it...
-- Duy