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

Re: [PATCH v1] config: Add hashtable for config parsing & retrival

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 10, 2014, 11:45 UTC
Message-ID
<CAPig+cSosjLsRekAb6+jqmL3Lcyjpp5Z7MPWXJB+j+tj_g7FGg@mail.gmail.com>
In-Reply-To
<1402318146-5062-2-git-send-email-tanayabh@gmail.com>
One additional comment...
On Mon, Jun 9, 2014 at 8:49 AM, Tanay Abhra <tanayabh@gmail.com> wrote:
Show 12 quoted lines
> +static int config_cache_set_value(const char *key, const char *value)
> +{
> +       struct hashmap *config_cache;
> +       struct config_cache_entry *e;
> +
> +       config_cache = get_config_cache();
> +       e = config_cache_find_entry(key);
> +       if (!e) {
> +               e = xmalloc(sizeof(*e));
> +               hashmap_entry_init(e, strhash(key));
> +               e->key = xstrdup(key);
> +               e->value_list = xcalloc(sizeof(struct string_list), 1);
Order of xcalloc() arguments is incorrect [1].
[1]: http://git.661346.n2.nabble.com/PATCH-00-15-Rearrange-xcalloc-arguments-td7611675.html
Show 8 quoted lines
> +               e->value_list->strdup_strings = 1;
> +               string_list_append(e->value_list, value);
> +               hashmap_add(config_cache, e);
> +       } else {
> +               string_list_append(e->value_list, value);
> +       }
> +       return 0;
> +}
Previous: Eric SunshineNext: Tanay Abhra
Message 8 of 11 in “Git config cache & special querying api utilizing the cache”
  1. Git config cache & special querying api utilizing the cacheTanay Abhra, Jun 9, 2014
  2. config: Add hashtable for config parsing & retrivalTanay Abhra, Jun 9, 2014
  3. Matthieu MoyJun 9, 2014
  4. Eric SunshineJun 10, 2014
  5. Eric SunshineJun 10, 2014
  6. Tanay AbhraJun 10, 2014
  7. Eric SunshineJun 10, 2014
  8. Eric SunshineJun 10, 2014
  9. Tanay AbhraJun 10, 2014
  10. Eric SunshineJun 10, 2014
  11. Matthieu MoyJun 11, 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.