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, 18:43 UTC
Message-ID
<D00D01B3-6B93-4881-9CA3-4745799373C5@gmail.com>
In-Reply-To
<7vy58v6fsc.fsf@alter.siamese.dyndns.org>
On Jul 24, 2013, at 10:14, Junio C Hamano wrote:
Show 10 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> How hard would it be to convert the "-c" option of test-url-normalize
>> into something like:
>>
>>  git config --file=foo --url http noepsv $URL
>>
>> which would look for http.$URL.noepsv matches.
>
> Lovely.
[snip]
Show 18 quoted lines
> Another thing we may want to consider is to see if we can
> restructure the http_options interface a bit, so that the caller can
> be agonistic to the actual meaning of the key.  For example,
>
>  "git config --url http notknownyet $URL"
>
> may want to be able to show the value for http.<pattern>.notknownyet
> for the most matching <pattern> for a given $URL, without knowing
> what the variable means, just like any other configuration that is
> queried via the "git config" program.  The caller may want to pass
> further type information like --bool, --int and --path as needed.
>
>>> +#define url_normalize(u) http_options_url_normalize(u)
>>
>> Does this macro do anything besides shorten the name? Is the extra
>> level of indirection to the reader worth it?
>
> Probably not.

It's a hint that the name of the function might change. If it's going to be used in a more generic fashion it may not belong in http.c anymore in which case the name will likely change along with the location. Nothing about the normalization function requires CURL or http/https, so it would work equally well on rsync, ftp, smtp etc. urls and could just move into url.{h,c} as url_normalize.

Previous: Junio C HamanoNext: Kyle J. McKay
Message 8 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.