summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-09-11 10:33:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-09-11 10:33:25 -0700
commit7f346e9d73e75871d525664f36b7a5166b4feaf3 (patch)
tree23ed0c98c3e379888f2d16e8d8dfd31468637ec0 /Documentation/technical
parentUpdate draft release notes to 2.2 (diff)
parentadd tests for `git_config_get_string_const()` (diff)
downloadtgif-7f346e9d73e75871d525664f36b7a5166b4feaf3.tar.xz
Merge branch 'ta/config-set-1'
Use the new caching config-set API in git_config() calls. * ta/config-set-1: add tests for `git_config_get_string_const()` add a test for semantic errors in config files rewrite git_config() to use the config-set API config: add `git_die_config()` to the config-set API change `git_config()` return value to void add line number and file name info to `config_set` config.c: fix accuracy of line number in errors config.c: mark error and warnings strings for translation
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/api-config.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt
index 21f280ca6d..0d8b99b368 100644
--- a/Documentation/technical/api-config.txt
+++ b/Documentation/technical/api-config.txt
@@ -155,6 +155,19 @@ as well as retrieval for the queried variable, including:
Similar to `git_config_get_string`, but expands `~` or `~user` into
the user's home directory when found at the beginning of the path.
+`git_die_config(const char *key, const char *err, ...)`::
+
+ First prints the error message specified by the caller in `err` and then
+ dies printing the line number and the file name of the highest priority
+ value for the configuration variable `key`.
+
+`void git_die_config_linenr(const char *key, const char *filename, int linenr)`::
+
+ Helper function which formats the die error message according to the
+ parameters entered. Used by `git_die_config()`. It can be used by callers
+ handling `git_config_get_value_multi()` to print the correct error message
+ for the desired value.
+
See test-config.c for usage examples.
Value Parsing Helpers