mirror of
https://git.proxmox.com/git/libgit2
synced 2025-10-28 02:47:35 +00:00
git_repository_free() calls git_index_free() if the owned index is not null. According to the doc, when setting a new index through git_repository_set_index() the caller has still to take care of releasing the index by itself. In order to cope with this, this fix makes sure the index refcount is incremented when a new repository is being plugged a new index. |
||
|---|---|---|
| .. | ||
| attr | ||
| buf | ||
| commit | ||
| config | ||
| core | ||
| diff | ||
| index | ||
| network | ||
| notes | ||
| object | ||
| odb | ||
| refs | ||
| repo | ||
| revwalk | ||
| status | ||
| clar | ||
| clar_helpers.c | ||
| clar_libgit2.h | ||
| README.md | ||
Writing Clar tests for libgit2
For information on the Clar testing framework and a detailed introduction please visit:
https://github.com/tanoku/clar
-
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.