diff options
author | Daniel Rodríguez Troitiño <drodrigueztroitino@yahoo.es> | 2013-10-31 01:08:50 +0100 |
---|---|---|
committer | Daniel Rodríguez Troitiño <drodrigueztroitino@yahoo.es> | 2013-11-01 00:08:52 +0100 |
commit | 3793fa9b181f3595c24a1cc517646f8e7a4a7175 (patch) | |
tree | bb78115b16c217afa41257af7ea4af12ad23896b /tests/diff/blob.c | |
parent | f93f3790c511d3ed821bf63fdaf5aeec155e195b (diff) | |
download | libgit2-3793fa9b181f3595c24a1cc517646f8e7a4a7175.tar.gz |
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.
Diffstat (limited to 'tests/diff/blob.c')
0 files changed, 0 insertions, 0 deletions