Re: [BUG] worktree local refs weirdness
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 7, 2019, 10:20 UTC
- Message-ID
- <CACsJy8Dt9eky51g_hrakGdMHks2mwCEn9uGFNkPO249H-s0+2A@mail.gmail.com>
- In-Reply-To
- <CACsJy8CrSGQt=_RK8cwc3AW_+gfGLf_M5UKAmjMZrm43Qu3Z8Q@mail.gmail.com>
On Thu, Mar 7, 2019 at 4:46 PM Duy Nguyen <pclouds@gmail.com> wrote:
Show 20 quoted lines
> > On Thu, Mar 7, 2019 at 4:38 PM Phillip Wood <phillip.wood123@gmail.com> wrote: > > > > 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...
My mistake. refs/rewritten is per-worktree, but the ref iteration code has a bug. The fix should come soon.
-- Duy