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

Re: ref-in-want does not consider namespace

From
Kim Altintop <kim@eagain.st>
Date
Jul 27, 2021, 09:11 UTC
Message-ID
<CD3T1FV0ICZK.1QYV25UTSU768@schmidt>
In-Reply-To
<20210726164414.2208736-1-jonathantanmy@google.com>
Thanks Jonathan
> 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?

"ref-prefix" works as expected in the newer version, but not "want-ref". I haven't properly bisected, but the fix seems to coincide with b3970c7, although I'm not sure if that was intentional.

> In any case, t5703 should contain a namespace test, but it doesn't seem
> to.
Yes I noticed that your original patch did contain a test for this.
> Would you be able to contribute a patch?
With some handholding, I'd be at least up for giving it a spin :)

One thing that is unclear to me is how "hideRefs" is supposed to interact with "want-ref". At the moment, it seems like a client can "want-ref" _any_ ref, even if it is hidden by "hideRefs". It might seem sensible to ignore hidden refs, but then the situation could occur that the effective list of "want-ref"s is empty.

If that happens, and the client did not send any "want"s either, "upload-pack" ignores the fetch command altogether and just waits for the next command. In this case, the client can only recover by timing out the connection.

So should this be special-cased somehow and result in an error response?
Previous: Jonathan Tan
Message 4 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.