libgit2/tests-clar/config
Daniel Rodríguez Troitiño 3793fa9b18 Fix saving remotes with several fetch/push ref specs.
At some moment git_config_delete_entry lost the ability to delete one entry of
a multivar configuration. The moment you had more than one fetch or push
ref spec for a remote you will not be able to save that remote anymore. The
changes in network::remote::remotes::save show that problem.

I needed to create a new git_config_delete_multivar because I was not able to
remove one or several entries of a multivar config with the current API.
Several tries modifying how git_config_set_multivar(..., NULL) behaved were
not successful.

git_config_delete_multivar is very similar to git_config_set_multivar, and
delegates into config_delete_multivar of config_file. This function search
for the cvar_t that will be deleted, storing them in a temporal array, and
rebuilding the linked list. After calling config_write to delete the entries,
the cvar_t stored in the temporal array are freed.

There is a little fix in config_write, it avoids an infinite loop when using
a regular expression (case for the multivars). This error was found by the
test network::remote::remotes::tagopt.
2013-11-01 00:08:52 +01:00
..
add.c Clean up config.h 2012-11-27 13:18:28 -08:00
backend.c Move git_config_backend to include/git2/sys 2013-04-21 11:50:55 -07:00
config_helpers.c remote: introduce git_remote_rename() 2012-10-25 17:42:36 +02:00
config_helpers.h remote: introduce git_remote_rename() 2012-10-25 17:42:36 +02:00
configlevel.c Remove unused variables 2012-11-13 14:28:44 +01:00
global.c Make tests pass if XDG config exists 2013-09-24 15:46:20 -07:00
include.c config: handle realloc issues from larger depths 2013-09-07 20:51:26 +02:00
multivar.c Fix saving remotes with several fetch/push ref specs. 2013-11-01 00:08:52 +01:00
new.c config: Opening a nonexistent file returns ENOTFOUND 2012-11-17 18:30:34 -08:00
read.c Add negative test cases for config header with invalid characters 2013-10-01 09:56:59 +08:00
refresh.c Add git_config_refresh() API to reload config 2012-10-30 12:11:23 -07:00
stress.c Merge pull request #1278 from sba1/cl-assert-equal-s 2013-01-25 20:37:39 -08:00
validkeyname.c config: get_multivar -> get_multivar_foreach 2013-08-08 13:57:01 +02:00
write.c config: allow empty string as value 2013-08-08 22:25:25 +03:00