All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kim Altintop <kim@eagain.st>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, bwilliamseng@gmail.com
Subject: Re: ref-in-want does not consider namespace
Date: Tue, 27 Jul 2021 09:11:52 +0000	[thread overview]
Message-ID: <CD3T1FV0ICZK.1QYV25UTSU768@schmidt> (raw)
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?


      reply	other threads:[~2021-07-27  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CD3T1FV0ICZK.1QYV25UTSU768@schmidt \
    --to=kim@eagain.st \
    --cc=bwilliamseng@gmail.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.
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.