mirror of
https://git.proxmox.com/git/libgit2
synced 2025-11-02 21:51:55 +00:00
The goal of this work is to expose the search logic for "global", "system", and "xdg" files through the git_libgit2_opts() interface. Behind the scenes, I changed the logic for finding files to have a notion of a git_strarray that represents a search path and to store a separate search path for each of the three tiers of config file. For each tier, I implemented a function to initialize it to default values (generally based on environment variables), and then general interfaces to get it, set it, reset it, and prepend new directories to it. Next, I exposed these interfaces through the git_libgit2_opts interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants for the user to control which search path they were modifying. There are alternative designs for the opts interface / argument ordering, so I'm putting this phase out for discussion. Additionally, I ended up doing a little bit of clean up regarding attr.h and attr_file.h, adding a new attrcache.h so the other two files wouldn't have to be included in so many places. |
||
|---|---|---|
| .. | ||
| attr | ||
| buf | ||
| checkout | ||
| clar | ||
| clone | ||
| commit | ||
| config | ||
| core | ||
| date | ||
| diff | ||
| fetchhead | ||
| index | ||
| merge | ||
| network | ||
| notes | ||
| object | ||
| odb | ||
| online | ||
| pack | ||
| refdb | ||
| refs | ||
| repo | ||
| reset | ||
| resources | ||
| revwalk | ||
| stash | ||
| status | ||
| 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.