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

Re: [RFH Patch 2/2] http_init(): Fix config file parsing

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 10, 2009, 03:05 UTC
Message-ID
<76718490903092005n66bca743t67eb7f0ff830d9d7@mail.gmail.com>
In-Reply-To
<7vfxhmce67.fsf@gitster.siamese.dyndns.org>
On Mon, Mar 9, 2009 at 10:19 PM, Junio C Hamano <gitster@pobox.com> wrote:
>  * This is what I need help from people who actually do use http transport
>   and extra set of eyeballs to spot silly mistakes.
It looks sane to me.
Show 20 quoted lines
> @@ -241,14 +221,18 @@ void http_init(struct remote *remote)
>        if (getenv("GIT_SSL_NO_VERIFY"))
>                curl_ssl_verify = 0;
>
> -       ssl_cert = getenv("GIT_SSL_CERT");
> +       if (getenv("GIT_SSL_CERT"))
> +               ssl_cert = getenv("GIT_SSL_CERT");
>  #if LIBCURL_VERSION_NUM >= 0x070902
> -       ssl_key = getenv("GIT_SSL_KEY");
> +       if (getenv("GIT_SSL_KEY"))
> +               ssl_key = getenv("GIT_SSL_KEY");
>  #endif
>  #if LIBCURL_VERSION_NUM >= 0x070908
> -       ssl_capath = getenv("GIT_SSL_CAPATH");
> +       if (getenv("GIT_SSL_CAPATH"))
> +               ssl_capath = getenv("GIT_SSL_CAPATH");
>  #endif
> -       ssl_cainfo = getenv("GIT_SSL_CAINFO");
> +       if (getenv("GIT_SSL_CAINFO"))
> +               ssl_cainfo = getenv("GIT_SSL_CAINFO");
Would these be a little cleaner with a temporary variable. e.g.
char *value;
if ((value = getenv("GIT_SSL_CERT")))
    ssl_cert = value;
j.
Previous: Junio C HamanoNext: Johannes Schindelin
Message 2 of 3 in “http_init(): Fix config file parsing”
  1. 2/2 http_init(): Fix config file parsingJunio C Hamano, Mar 10, 2009
  2. Jay SoffianMar 10, 2009
  3. Johannes SchindelinMar 10, 2009

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.