Re: [PATCH GSoC v18 11/13] cat-file: add remote-object-info to batch-command
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 15, 2026, 17:31 UTC
- Message-ID
- <xmqqjyqwnoqf.fsf@gitster.g>
- In-Reply-To
- <20260715-ps-eric-work-rebase-v18-11-34d7adb051bb@gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 24 quoted lines
> +static void parse_cmd_remote_object_info(struct batch_options *opt,
> + const char *line, struct strbuf *output,
> + struct expand_data *data)
> +{
> + int count;
> + const char **argv;
> + char *line_to_split;
> + struct object_info *remote_object_info = NULL;
> + struct oid_array object_info_oids = OID_ARRAY_INIT;
> +
> + if (strlen(line) >= MAX_REMOTE_OBJ_INFO_LINE)
> + die(_("remote-object-info command too long"));
> +
> + line_to_split = xstrdup(line);
> + count = split_cmdline(line_to_split, &argv);
> + if (count < 0)
> + die(_("remote-object-info: %s"), split_cmdline_strerror(count));
> + if (count - 1 > MAX_ALLOWED_OBJ_LIMIT)
> + die(_("remote-object-info supports at most %d objects"),
> + MAX_ALLOWED_OBJ_LIMIT);
> +
> + if (get_remote_info(opt, count, argv, &remote_object_info,
> + &object_info_oids))
> + goto cleanup;Since this function does not return a value, the caller cannot even tell if there was an error if we just silently return like this. Is it really OK to silently ignore such a failure? Should we not die() loudly to report it instead?
Thanks.