I am taking this patch out of RFC.
[PATCH V1]:Most of the invaluable suggestions by Eric Sunshine, Torsten
Jeff King has been implemented. Complete rewrite of config_cache*()
using git_config() as hook as suggested by Jeff. Thanks for the review.
[RFC V2]: Improved according to the suggestions by Eric Sunshine and Torsten
Added cache invalidation when config file is changed.
I am using git_config_set_multivar_in_file() as an update hook.
This is my first patch for this year's GSoC. My project is
"Git Config API improvements". The link of my proposal is appended below .
The aim of this patch series is to generate a cache for querying values from
the config files in a non-callback manner as the current method reads and
parses the config files every time a value is queried for.
The cache is generated from hooking the update_cache function to the current
parsing and callback mechanism in config.c. It is implemented as an hashmap
using the hashmap-api with variables and its corresponding values list as
its members. The values in the list are sorted in order of increasing priority.
The cache is initialised the first time when any of the new query functions is
called. It is invalidated by using git_config_set_multivar_in_file() as an
We add two new functions to the config-api, git_config_get_string() and
git_config_get_string_multi() for querying in a non callback manner from
I have run the tests and debug the code using custom functions and it works
Tanay Abhra (1):
config: Add hashtable for config parsing & retrival
Documentation/technical/api-config.txt | 18 +++++
cache.h | 2 +
config.c | 122 +++++++++++++++++++++++++++++++++
3 files changed, 142 insertions(+)
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html