From: Kim Altintop <kim@eagain.st>
To: git@vger.kernel.org
Cc: jonathantanmy@google.com, bmwill@google.com
Subject: ref-in-want does not consider namespace
Date: Mon, 26 Jul 2021 08:36:39 +0000 [thread overview]
Message-ID: <CD2XNXHACAXS.13J6JTWZPO1JA@schmidt> (raw)
[-- 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 --]
next reply other threads:[~2021-07-26 8:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 8:36 Kim Altintop [this message]
2021-07-26 11:55 ` ref-in-want does not consider namespace Kim Altintop
2021-07-26 16:44 ` Jonathan Tan
2021-07-27 9:11 ` Kim Altintop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CD2XNXHACAXS.13J6JTWZPO1JA@schmidt \
--to=kim@eagain.st \
--cc=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).