summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-11 10:33:25 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-11 10:33:25 -0700
commit7f346e9d73e75871d525664f36b7a5166b4feaf3 (patch)
tree23ed0c98c3e379888f2d16e8d8dfd31468637ec0 /Documentation
parent0c72b98f31bf6eabd75be565a08ffcf0d8e74b1f (diff)
parent8a7b034d6d451491dbcfaebc3d4ed4f08c756822 (diff)
downloadgit-7f346e9d73e75871d525664f36b7a5166b4feaf3.tar.gz
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')
-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