git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ref-in-want does not consider namespace

From
JTJonathan 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/
Previous: Kim AltintopNext: Kim Altintop
Message 3 of 4 in “ref-in-want does not consider namespace”
  1. Kim AltintopJul 26, 2021
  2. Kim AltintopJul 26, 2021
  3. Jonathan TanJul 26, 2021
  4. Kim AltintopJul 27, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.