git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bundle-uri: validate that bundle entries have a uri

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 19, 2025, 08:54 UTC
Message-ID
<xmqqcy4ax363.fsf@gitster.g>
In-Reply-To
<pull.2134.git.git.1766097223647.gitgitgadget@gmail.com>
"Sam Bostock via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 15 quoted lines
>  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 = ..."?

Previous: Sam Bostock via GitGitGadgetNext: Sam Bostock via GitGitGadget
Message 2 of 3 in “bundle-uri: validate that bundle entries have a uri”
  1. bundle-uri: validate that bundle entries have a uriSam Bostock via GitGitGadget, Dec 18, 2025
  2. Junio C HamanoDec 19, 2025
  3. bundle-uri: validate that bundle entries have a uriSam Bostock via GitGitGadget, Dec 19, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.