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

Re: [PATCH 5/3] revert most of the http_options() change

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 30, 2013, 21:09 UTC
Message-ID
<7vy58nvjou.fsf@alter.siamese.dyndns.org>
In-Reply-To
<3C93D9D6-8FC3-4D94-AE6E-37150202314A@gmail.com>
"Kyle J. McKay" <mackyle@gmail.com> writes:
Show 5 quoted lines
> And now all the t5200-url-normalize tests pass again.
>
> FYI, I couldn't get the patches to apply against next or pu without
> some minor tweaks that were just conflict resolutions having to do
> with git_config_with_options changing its signature.
Thanks.

I built these five patches directly on top of your series, i.e. on top of cea9928d (docs: update http.<url>.* options documentation, 2013-07-25).

I'll rebuild the series with your fixes and I may even queue it to 'pu', but with some random thoughts:

 * "url-match.[ch]" are ugly names.  I'd be happier with
   "urlmatch.[ch]".
 * In the end result, http_options() looks mostly identical to that
   of the 'master', but it got an extra "void *matched", only to
   support "git config --get-urlmatch".  I however do not have to,
   if I do a few things:
   - Instead of implementing urlmatch_config_item that extends
     urlmatch_item, have a separate string_list, keyed by the
     variable names, and point the string_list with the generic cb
     pointer I already have in urlmatch_config.  The fn() on the
     "git config" side has to index this second string_list with the
     variable and keep track of the value from the best candidate we
     have seen so far.
   - The above allows us to lose item_alloc and item_clear callback
     functions from urlmatch_config, as we will not be doing the
     structure inheritance to extend urlmatch_item.
   - We still need cascade_fn callback, though.
 * With the above, http_options() does not have to change in the
   series.  We could restructure the series perhaps this way:
   - http.sslCertPasswordProtected parsing fix.
   - Add urlmatch.[ch], which would be your "config: improve support
     for http.<url>.* settings" and yesterday's "url-match: split
     out URL matching logic out of http.c", and a half of
     "url-match: generalize configuration collection logic".
   - Update http.c to use urlmatch.[ch] to make http.c match the
     result of the endgame patch [5/3], and add necessary end user
     documentation to Documentation/config.txt.
   - Add test-url-normalize and t/t5200
   - Update builtin/config.c for "--get-urlmatch", to make
     builtin/config.c match the result of the endgame patch [5/3],
     add end user documentation to Documentation/git-config.txt.
   - Add some tests for "git config --get-urlmatch".
Previous: Kyle J. McKayNext: Ramsay Jones
Message 17 of 19 in “test-url-normalize.c: Fix gcc errors and sparse warnings”
  1. test-url-normalize.c: Fix gcc errors and sparse warningsRamsay Jones, Jul 24, 2013
  2. Kyle J. McKayJul 24, 2013
  3. Junio C HamanoJul 24, 2013
  4. 0/3 "git config --get-urlmatch $section.$key $url"Junio C Hamano, Jul 29, 2013
  5. 1/3 url-match: split out URL matching logic out of http.cJunio C Hamano, Jul 29, 2013
  6. 2/3 builtin/config: refactor collect_config()Junio C Hamano, Jul 29, 2013
  7. 3/3 config: --get-urlmatchJunio C Hamano, Jul 29, 2013
  8. Jeff KingJul 30, 2013
  9. Junio C HamanoJul 30, 2013
  10. Jeff KingJul 30, 2013
  11. Junio C HamanoJul 30, 2013
  12. Kyle J. McKayJul 30, 2013
  13. 4/3 url-match: generalize configuration collection logicJunio C Hamano, Jul 30, 2013
  14. 5/3 revert most of the http_options() changeJunio C Hamano, Jul 30, 2013
  15. Kyle J. McKayJul 30, 2013
  16. Kyle J. McKayJul 30, 2013
  17. Junio C HamanoJul 30, 2013
  18. Ramsay JonesJul 31, 2013
  19. Junio C HamanoJul 31, 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.