From: Junio C Hamano <gitster@pobox.com>
To: "Sam Bostock via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Sam Bostock <sam.bostock@shopify.com>
Subject: Re: [PATCH] bundle-uri: validate that bundle entries have a uri
Date: Fri, 19 Dec 2025 17:54:12 +0900 [thread overview]
Message-ID: <xmqqcy4ax363.fsf@gitster.g> (raw)
In-Reply-To: <pull.2134.git.git.1766097223647.gitgitgadget@gmail.com> (Sam Bostock via GitGitGadget's message of "Thu, 18 Dec 2025 22:33:43 +0000")
"Sam Bostock via GitGitGadget" <gitgitgadget@gmail.com> writes:
> bundle-uri.c | 22 +++++++++++++++++++++-
> t/t5750-bundle-uri-parse.sh | 26 ++++++++++++++++++++++++++
> 2 files changed, 47 insertions(+), 1 deletion(-)
>
> diff --git a/bundle-uri.c b/bundle-uri.c
> index 57cccfc6b8..022e2109a6 100644
> --- a/bundle-uri.c
> +++ b/bundle-uri.c
> @@ -89,7 +89,8 @@ static int summarize_bundle(struct remote_bundle_info *info, void *data)
> {
> FILE *fp = data;
> fprintf(fp, "[bundle \"%s\"]\n", info->id);
> - fprintf(fp, "\turi = %s\n", info->uri);
> + if (info->uri)
> + fprintf(fp, "\turi = %s\n", info->uri);
All the other code paths error out when info->uri is missing; I can
understand that print_bundle_list() want to keep going as it is
primarily for debugging, but then don't we want to more loudly
report that a mandatory thing info->uri is missing, rather than a
subtle hint that is lack of expected line that shows "uri = ..."?
next prev parent reply other threads:[~2025-12-19 8:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 22:33 [PATCH] bundle-uri: validate that bundle entries have a uri Sam Bostock via GitGitGadget
2025-12-19 8:54 ` Junio C Hamano [this message]
2025-12-19 16:01 ` [PATCH v2] " Sam Bostock via GitGitGadget
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=xmqqcy4ax363.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=sam.bostock@shopify.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 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 NNTP newsgroup(s).