mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-08 13:55:49 +00:00
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. |
||
|---|---|---|
| .. | ||
| attr | ||
| buf | ||
| checkout | ||
| clar | ||
| clone | ||
| commit | ||
| config | ||
| core | ||
| date | ||
| diff | ||
| fetchhead | ||
| filter | ||
| index | ||
| merge | ||
| network | ||
| notes | ||
| object | ||
| odb | ||
| online | ||
| pack | ||
| refs | ||
| repo | ||
| reset | ||
| resources | ||
| revwalk | ||
| stash | ||
| status | ||
| stress | ||
| submodule | ||
| threads | ||
| trace | ||
| clar_libgit2.c | ||
| clar_libgit2.h | ||
| clar.c | ||
| clar.h | ||
| generate.py | ||
| main.c | ||
| README.md | ||
| valgrind-supp-mac.txt | ||
Writing Clar tests for libgit2
For information on the Clar testing framework and a detailed introduction please visit:
-
Write your modules and tests. Use good, meaningful names.
-
Make sure you actually build the tests by setting:
cmake -DBUILD_CLAR=ON build/ -
Test:
./build/libgit2_clar -
Make sure everything is fine.
-
Send your pull request. That's it.