mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-25 05:41:39 +00:00
Taking a page from core git's strbuf, this introduces git_buf_initbuf which is an empty string that is used to initialize the git_buf ptr value even for new buffers. Now the git_buf ptr will always point to a valid NUL-terminated string. This change required jumping through a few hoops for git_buf_grow and git_buf_free to distinguish between a actual allocated buffer and the global initial value. Also, this moves the allocation related functions to be next to each other near the top of buffer.c. |
||
|---|---|---|
| .. | ||
| buf | ||
| config | ||
| core | ||
| index | ||
| network | ||
| object | ||
| odb | ||
| repo | ||
| status | ||
| clay | ||
| clay_libgit2.h | ||
| clay_main.c | ||
| clay.h | ||
| README.md | ||
Writing Clay tests for libgit2
For information on the Clay testing framework and a detailed introduction please visit:
https://github.com/tanoku/clay
-
Write your modules and tests. Use good, meaningful names.
-
Mix the tests:
./clay -vtap . -
Make sure you actually build the tests by setting:
BUILD_CLAY=ON -
Test:
./build/libgit2_clay -
Make sure everything is fine.
-
Send your pull request. That's it.