Re: ref-in-want does not consider namespace
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jul 26, 2021, 16:44 UTC
- Message-ID
- <20210726164414.2208736-1-jonathantanmy@google.com>
- In-Reply-To
- <pMV5dJabxOBTD8kJBaPuWK0aS6OJhRQ7YFGwfhPCeSJEbPDrIFBza36nXBCgUCeUJWGmpjPI1rlOGvZJEh71Ruz4SqljndUwOCoBUDRHRDU=@eagain.st>
Show 8 quoted lines
> > Running `ls-refs` with a namespace-relative > > > > `ref-prefix refs/heads/*` > > > > will work as expected > > That turned out to not be entirely true: it does work as expected with a > 2.31.1 install, but fails to select any refs with 2.20.1.
Your expectation that "want-ref refs/heads/main" should match "refs/namespaces/foo/refs/heads/main" when you run upload-pack with "--namespace=foo" makes sense to me. Just to clarify - does this mean tha 2.31.1 works like you expect?
In any case, t5703 should contain a namespace test, but it doesn't seem to. We could just use the one in my original patch [1] (thanks for looking it up, by the way). Would you be able to contribute a patch? I see that in [1], I had my own helpers to construct the input, but "test-tool pkt-line" now exists (as you can see in t5703) so you can do that instead.
[1] https://lore.kernel.org/git/d0d42b3bb4cf755f122591e191354c53848f197d.1485381677.git.jonathantanmy@google.com/