All of lore.kernel.org
 help / color / mirror / Atom feed
* ref-in-want does not consider namespace
@ 2021-07-26  8:36 Kim Altintop
  2021-07-26 11:55 ` Kim Altintop
  0 siblings, 1 reply; 4+ messages in thread
From: Kim Altintop @ 2021-07-26  8:36 UTC (permalink / raw)
  To: git; +Cc: jonathantanmy, bmwill

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

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/

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-27  9:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26  8:36 ref-in-want does not consider namespace Kim Altintop
2021-07-26 11:55 ` Kim Altintop
2021-07-26 16:44   ` Jonathan Tan
2021-07-27  9:11     ` Kim Altintop

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.