Re: [PATCH v3 1/3] remote: add relative_url_gently()
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Nov 6, 2026, 14:36 UTC
- Message-ID
- <aa2063a2-3fab-453c-9f88-86861432eede@gmail.com>
- 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