Git development
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Aniket Gupta <aniketgupta3001@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v3 1/3] remote: add relative_url_gently()
Date: Fri, 6 Nov 2026 09:36:37 -0500	[thread overview]
Message-ID: <aa2063a2-3fab-453c-9f88-86861432eede@gmail.com> (raw)
In-Reply-To: <20261105152842.566318-2-aniketgupta3001@gmail.com>

On 11/5/2026 10:28 AM, Aniket Gupta wrote:
> relative_url() calls die() when there are more "../" components in the
> URL than the base URL can absorb. A caller that would rather carry on
> has no way to do so.

I agree that we should have a mechanism to allow users to know about a
broken bundle URI and to respond somehow. 
> Add relative_url_gently(), which returns NULL and adds the reason to a
> strbuf instead of dying. relative_url() is now a thin wrapper around
> it that continues to die, so existing callers behave the same.

This method is good to have, in general, and is written well.

The only question here is if we should be changing the behavior for
bundle-URI clones from halting on bad data to skipping bundles and
doing the full operation from the remote.

(But there's more about this in patch 3, so I'll defer until then.)

Thanks,
-Stolee


  reply	other threads:[~2026-11-06 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 15:28 [PATCH v3 0/3] bundle-uri: do not die on unresolvable relative URIs Aniket Gupta
2026-11-05 15:28 ` [PATCH v3 1/3] remote: add relative_url_gently() Aniket Gupta
2026-11-06 14:36   ` Derrick Stolee [this message]
2026-11-05 15:28 ` [PATCH v3 2/3] remote: do not show credentials when relative_url() fails Aniket Gupta
2026-11-06 14:43   ` Derrick Stolee
2026-11-06 19:15     ` Junio C Hamano
2026-11-05 15:28 ` [PATCH v3 3/3] bundle-uri: do not die on unresolvable relative URIs Aniket Gupta
2026-11-06 14:51   ` Derrick Stolee
2026-11-06 14:57 ` [PATCH v3 0/3] " Derrick Stolee
2026-11-06 17:25   ` Aniket Gupta

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=aa2063a2-3fab-453c-9f88-86861432eede@gmail.com \
    --to=stolee@gmail.com \
    --cc=aniketgupta3001@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ps@pks.im \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox