Re: [PATCH v4 1/6] fetch-pack: refactor packet writing
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Oct 25, 2024, 09:52 UTC
- Message-ID
- <CAOLa=ZSb6p_z8jJHSWCfqD6bdTNNXQw-Dq6DsQWt+o+cyQ3x9Q@mail.gmail.com>
- In-Reply-To
- <20241024205359.16376-2-eric.peijian@gmail.com>
Eric Ju <eric.peijian@gmail.com> writes:
[snip]
Show 22 quoted lines
> +
> +void send_object_info_request(int fd_out, struct object_info_args *args)
> +{
> + struct strbuf req_buf = STRBUF_INIT;
> +
> + write_command_and_capabilities(&req_buf, "object-info", args->server_options);
> +
> + if (unsorted_string_list_has_string(args->object_info_options, "size"))
> + packet_buf_write(&req_buf, "size");
> +
> + if (args->oids) {
> + for (size_t i = 0; i < args->oids->nr; i++)
> + packet_buf_write(&req_buf, "oid %s", oid_to_hex(&args->oids->oid[i]));
> + }
> +
> + packet_buf_flush(&req_buf);
> + if (write_in_full(fd_out, req_buf.buf, req_buf.len) < 0)
> + die_errno(_("unable to write request to remote"));
> +
> + strbuf_release(&req_buf);
> +}
> +Was this function meant to be added here? I mean, there is no reference to it in the commit message or anywhere else.
[snip]