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

Re: [PATCH v4 1/2] add `config_set` API for caching config files

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 2, 2014, 17:09 UTC
Message-ID
<vpqbnt7k7qk.fsf@anie.imag.fr>
In-Reply-To
<xmqqd2dnitm7.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 23 quoted lines
> Tanay Abhra <tanayabh@gmail.com> writes:
>
>> diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt
>> index 230b3a0..2c02fee 100644
>> --- a/Documentation/technical/api-config.txt
>> +++ b/Documentation/technical/api-config.txt
>> @@ -77,6 +77,75 @@ To read a specific file in git-config format, use
>>  `git_config_from_file`. This takes the same callback and data parameters
>>  as `git_config`.
>>  
>> +Querying For Specific Variables
>> +-------------------------------
>> +
>> +For programs wanting to query for specific variables in a non-callback
>> +manner, the config API provides two functions `git_config_get_value`
>> +and `git_config_get_value_multi`.They both read values from an internal
>> +cache generated previously from reading the config files.
>> +
>> +`git_config_get_value` takes two parameters,
>> +
>> +- a key string in canonical flat form for which the corresponding value
>
> What is "canonical flat form"?

Actually, it's defined above in the same file (was here before the patch):

  - the name of the parsed variable. This is in canonical "flat" form: the
    section, subsection, and variable segments will be separated by dots,
    and the section and variable segments will be all lowercase. E.g.,

But it might make sense to reword the doc, e.g. introduce a glossary section at the beginning.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Tanay Abhra
Message 13 of 17 in “git config cache & special querying api utilizing the cache”
  1. 0/3 git config cache & special querying api utilizing the cacheTanay Abhra, Jul 2, 2014
  2. 1/2 add `config_set` API for caching config filesTanay Abhra, Jul 2, 2014
  3. Matthieu MoyJul 2, 2014
  4. Tanay AbhraJul 2, 2014
  5. Matthieu MoyJul 2, 2014
  6. Junio C HamanoJul 2, 2014
  7. Tanay AbhraJul 4, 2014
  8. Matthieu MoyJul 4, 2014
  9. Tanay AbhraJul 4, 2014
  10. Matthieu MoyJul 4, 2014
  11. Junio C HamanoJul 7, 2014
  12. Junio C HamanoJul 2, 2014
  13. Matthieu MoyJul 2, 2014
  14. Tanay AbhraJul 3, 2014
  15. 2/2 test-config: Add tests for the config_set APITanay Abhra, Jul 2, 2014
  16. Matthieu MoyJul 2, 2014
  17. Tanay AbhraJul 2, 2014

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.