tests-clar/config/write.c


Log

Author Commit Date CI Message
Vicent Martí b9cb72c2 2013-11-10T07:33:11 Merge pull request #1950 from csware/quote-config-values Correctly quote config values while saving
Sven Strickroth 7dd28dde 2013-11-07T15:39:15 Add another testcase to make sure double quotes are correctly escaped Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth a9f7236a 2013-11-07T13:38:04 Add a testcase for values which needs quotes Signed-off-by: Sven Strickroth <email@cs-ware.de>
nulltoken e8162fd0 2013-11-05T12:01:14 Propagate ELOCKED error when updating the config
Nikolai Vladimirov c57f6682 2013-08-08T21:17:32 config: allow empty string as value `git_config_set_string(config, "config.section", "")` fails when escaping the value. The buffer in `escape_value` is allocated without NULL-termination. And in case of empty string 0 is passed for buffer size in `git_buf_grow`. `git_buf_detach` returns NULL when the allocated size is 0 and that leads to an error return in `GITERR_CHECK_ALLOC` called after `escape_value` The change in `config_file.c` was suggested by Russell Belfer <rb@github.com>
Carlos Martín Nieto 48bde2f1 2013-03-08T02:11:34 config: don't allow passing NULL as a value to set Passing NULL is non-sensical. The error message leaves to be desired, though, as it leaks internal implementation details. Catch it at the `git_config_set_string` level and set an appropriate error message.
Sebastian Bauer a7f8065f 2013-01-25T06:48:55 Use cl_assert_equal_s() instead of strcmp(). Replaced all cl_assert(!strcmp()) or semantically equivalent forms by cl_assert_equal_s().
Ben Straub 54b2a37a 2012-11-20T16:02:25 Clean up config.h
yorah a1abe66a 2012-09-10T12:11:02 Add config level support in the config API Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found. Added `git_config_open_level`: build a single-level focused config object from a multi-level one. We are now storing `git_config_entry`s in the khash of the config_file
yorah f8ede948 2012-09-18T14:10:40 Fix adding variable to config file with no trailing newline This can occur after a manual modification of a config file.
Carlos Martín Nieto 67d334c1 2012-06-11T16:57:02 config: add more tests for writing escaped chars
Adam Roben 750be86a 2012-06-09T12:45:21 Add a test that shows we don't preserve quotes in config values
Vicent Martí 904b67e6 2012-05-18T01:48:50 errors: Rename error codes
Vicent Martí e172cf08 2012-05-18T01:21:06 errors: Rename the generic return codes
Vicent Martí 255c38c5 2012-05-10T11:50:29 global: Fix unit tests after reordering
Carlos Martín Nieto 54fef6eb 2012-03-09T20:38:32 config: write out section headers with subsections correctly write_section() mistakenly treated is input as the whole variable name instead of simply the section (and possibly subsection) and would confuse "section.subsection" as a section plus variable name and produce a wrong section header. Fix this and include a test for writing "section.subsection.var" and reading it from the file.
Vicent Martí 3fd1520c 2012-01-24T20:35:15 Rename the Clay test suite to Clar Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!