Hello,
I am experimenting with the ref-in-want feature using a custom client and plain
`git-upload-pack` on the server end. To my suprise, it turned out that fetching
from a namespaced repository requires the `want-ref` lines to specify the refs
in namespaced form. That is:
Say I have the ref `refs/namespaces/foo/refs/heads/main`. I launch upload-pack
with `--namespace=foo`. Running `ls-refs` with a namespace-relative
`ref-prefix refs/heads/*`
will work as expected, but sendingr
`want-ref refs/heads/main`
will result in
`ERR unknown ref refs/heads/main`
Sending
`want-ref refs/namespaces/foo/refs/heads/main`
works, and the corresponding `wanted-refs` section will contain the ref as given
(ie. including the namespace path).
Since my understanding of git namespaces is that they should be transparent to
the client, I find this surprising.
I dug up an early version of a patch introducing the feature, which did handle
namespaces [0], but what eventually landed (authored by Brandon Williams)
didn't.
Was this an oversight, or is there a specific reason for the behaviour?
Thanks,
Kim
[0]: https://lore.kernel.org/git/d0d42b3bb4cf755f122591e191354c53848f197d.1485381677.git.jonathantanmy@google.com/ (local)