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

Re: [PATCH v8 3/4] tests: add new test for the url_normalize function

From
Kyle J. McKay <mackyle@gmail.com>
Date
Jul 24, 2013, 19:01 UTC
Message-ID
<D8BC48D1-195D-4F08-876C-FA592802A12C@gmail.com>
In-Reply-To
<20130724065933.GC30074@sigill.intra.peff.net>
On Jul 23, 2013, at 23:59, Jeff King wrote:
Show 25 quoted lines
>> diff --git a/test-url-normalize.c b/test-url-normalize.c
>> new file mode 100644
>> index 0000000..f18bd88
>> --- /dev/null
>> +++ b/test-url-normalize.c
>> [...]
>> +	if (!strcmp("sslverify", opt_lc.buf))
>> +		printf("%s\n", curl_ssl_verify ? "true" : "false");
>> +	else if (!strcmp("sslcert", opt_lc.buf))
>> +		printf("%s\n", ssl_cert);
>> +#if LIBCURL_VERSION_NUM >= 0x070903
>> +	else if (!strcmp("sslkey", opt_lc.buf))
>> +		printf("%s\n", ssl_key);
>> +#endif
>> +#if LIBCURL_VERSION_NUM >= 0x070908
>> +	else if (!strcmp("sslcapath", opt_lc.buf))
>> +		printf("%s\n", ssl_capath);
>> +#endif
>> [...]
>
> Do we need to have the complete list of options here, including curl
> version limitations? It seems like this will eventually get out of  
> date
> with the list of options. Would it be sufficient to test just one (or
> even just handle a fake "http.$URL.foo" variable)?

Right now, the values are only available as various strings, ints, longs etc. which have to be formatted differently for output. The original string value they were converted from is gone. The snippet shown above only shows some of the "%s" formatters.

Either the original value will have to be kept around or a reconstituted string depending on what:

git config --file=foo --url http noepsv $URL

should output. If the original value was 0 or 1, should it output that or "false" or "true"? The test-url-normalize code for "-c" normalizes the output to "false" or "true" for all boolean values and reconverts ints/longs to strings.

Previous: Kyle J. McKayNext: Jeff King
Message 9 of 19 in “config: add support for http.<url>.* settings”
  1. 0/4 config: add support for http.<url>.* settingsKyle J. McKay, Jul 22, 2013
  2. 1/4 config: add support for http.<url>.* settingsKyle J. McKay, Jul 22, 2013
  3. Jeff KingJul 24, 2013
  4. 2/4 config: improve support for http.<url>.* settingsKyle J. McKay, Jul 22, 2013
  5. 3/4 tests: add new test for the url_normalize functionKyle J. McKay, Jul 22, 2013
  6. Jeff KingJul 24, 2013
  7. Junio C HamanoJul 24, 2013
  8. Kyle J. McKayJul 24, 2013
  9. Kyle J. McKayJul 24, 2013
  10. Jeff KingJul 24, 2013
  11. 4/4 config: allow http.<url>.* any user matchingKyle J. McKay, Jul 22, 2013
  12. Junio C HamanoJul 22, 2013
  13. Kyle J. McKayJul 22, 2013
  14. Junio C HamanoJul 22, 2013
  15. Kyle J. McKayJul 22, 2013
  16. Junio C HamanoJul 22, 2013
  17. Jeff KingJul 24, 2013
  18. Junio C HamanoJul 24, 2013
  19. Jeff KingJul 24, 2013

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.