mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 07:20:07 +00:00
![]() This changes `git_index_read` to have two modes - a hard index reload that always resets the index to match the on-disk data (which was the old behavior) and a soft index reload that uses the timestamp / file size information and only replaces the index data if the file on disk has been modified. This then updates the git_status code to do a soft reload unless the new GIT_STATUS_OPT_NO_REFRESH flag is passed in. This also changes the behavior of the git_diff functions that use the index so that when an index is not explicitly passed in (i.e. when the functions call git_repository_index for you), they will also do a soft reload for you. This intentionally breaks the file signature of git_index_read because there has been some confusion about the behavior previously and it seems like all existing uses of the API should probably be examined to select the desired behavior. |
||
---|---|---|
.. | ||
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.