summaryrefslogtreecommitdiff
path: root/tests-clar/config/write.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename tests-clar to testsBen Straub2013-11-141-305/+0
|
* Merge pull request #1950 from csware/quote-config-valuesVicent Martí2013-11-101-0/+31
|\ | | | | Correctly quote config values while saving
| * Add another testcase to make sure double quotes are correctly escapedSven Strickroth2013-11-071-0/+4
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * Add a testcase for values which needs quotesSven Strickroth2013-11-071-0/+27
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | Propagate ELOCKED error when updating the confignulltoken2013-11-051-0/+13
|/
* config: allow empty string as valueNikolai Vladimirov2013-08-081-0/+17
| | | | | | | | | | | | | | `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>
* config: don't allow passing NULL as a value to setCarlos Martín Nieto2013-03-091-0/+14
| | | | | | 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.
* Use cl_assert_equal_s() instead of strcmp().Sebastian Bauer2013-01-251-1/+1
| | | | | Replaced all cl_assert(!strcmp()) or semantically equivalent forms by cl_assert_equal_s().
* Clean up config.hBen Straub2012-11-271-3/+3
|
* Add config level support in the config APIyorah2012-10-231-1/+75
| | | | | | | 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
* Fix adding variable to config file with no trailing newlineyorah2012-10-231-0/+18
| | | | This can occur after a manual modification of a config file.
* config: add more tests for writing escaped charsCarlos Martín Nieto2012-06-131-0/+29
|
* Add a test that shows we don't preserve quotes in config valuesAdam Roben2012-06-131-0/+17
|
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-2/+2
|
* errors: Rename the generic return codesVicent Martí2012-05-181-2/+2
|
* global: Fix unit tests after reorderingVicent Martí2012-05-181-5/+5
|
* config: write out section headers with subsections correctlyCarlos Martín Nieto2012-03-091-0/+15
| | | | | | | | | | 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.
* Rename the Clay test suite to ClarVicent Martí2012-01-241-0/+77
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!