Re: [PATCH v5 07/15] bugreport: add curl version
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Jan 30, 2020, 22:27 UTC
- Message-ID
- <CAN0heSqiMvMopqpMrnOffsO-nZ6UPWbuHQdB9VxLhWhm-d95rA@mail.gmail.com>
- In-Reply-To
- <20200124033436.81097-8-emilyshaffer@google.com>
On Fri, 24 Jan 2020 at 04:41, <emilyshaffer@google.com> wrote:
Show 20 quoted lines
> +static void get_curl_version_info(struct strbuf *curl_info)
> +{
> + struct child_process cp = CHILD_PROCESS_INIT;
> +
> + argv_array_push(&cp.args, "git");
> + argv_array_push(&cp.args, "remote-https");
> + argv_array_push(&cp.args, "--build-info");
> + if (capture_command(&cp, curl_info, 0))
> + strbuf_addstr(curl_info, "'git-remote-https --build-info' not supported\n");
> +}
>
> static void get_system_info(struct strbuf *sys_info)
> {
> @@ -31,6 +43,10 @@ static void get_system_info(struct strbuf *sys_info)
> strbuf_addstr(sys_info, "compiler info: ");
> get_compiler_info(sys_info);
> strbuf_complete_line(sys_info);
> +
> + strbuf_addstr(sys_info, "git-remote-https --build-info:\n");
> + get_curl_version_info(sys_info);The header here looks a lot like an implementation detail of `get_curl_version_info()`. Or put differently, these risk getting out of sync. Maybe frame the header a bit more human readable: "curl version". But is this "curl version", or more like "git-remote-https version"? There's some discrepancy here.
> + strbuf_complete_line(sys_info); > }
Martin