Older versions of gcc do not believe that we've adequately declared our
test functions. Include `clar_suite.h` conditionally for those old
versions. Do not do this on newer compilers to avoid unnecessary
recompilation of the entire suite when we add or remove a test function.
We may want to have test function declarations; produce a header file
with (only) the test declarations. Update clar to avoid overwriting the
file unnecessarily to avoid bumping timestamps and potentially
recompiling unnecessarily.
Threading can now be disabled with `USE_THREADS=OFF` instead of
`THREADSAFE=OFF` to better support the other cmake semantics.
Nanosecond support is the default _if_ we can detect it. This should be
our default always - like threads - and people can opt out explicitly.
Commit 4ae41f9c63 made `git_odb`
race-free, and added internal locking. Update `docs/threading.md`
accordingly, so that APIs built atop libgit2 (e.g. language bindings)
can count on this.
Provide a mechanism for users to limit the number of characters that are
examined; `git_fs_path_str_is_valid` and friends will only examine up to
`str->size` bytes.
`git_fs_path_is_valid` delegates to these new functions by passing
`SIZE_MAX` (instead of doing a `strlen`), which is a sentinel value
meaning "look for a NUL terminator".
Introduce `git_fs_path`, which operates on generic filesystem paths.
`git_path` will be kept for only git-specific path functionality (for
example, checking for `.git` in a path).
Only update the documentation on a `push`. We were previously updating the documentation only when not in a `pull_request`, which meant that we would push documentation updates in manual build triggers.
Looking up a non-existent object currently always invokes
`git_odb_refresh`. If looking up a large batch of objects, many of which
may legitimately not exist, this will repeatedly refresh the ODB to no
avail.
Add a `git_odb_exists_ext` that accepts flags controlling the ODB
lookup, and add a flag to suppress the refresh. This allows the user to
control if and when they refresh (for instance, refreshing once before
starting the batch).
Commit b1a6c316a6 moved auto-refresh into
the pack backend, and added a comment accordingly. Commit
43820f204e moved auto-refresh back *out*
of backends into the ODB layer, but didn't update the comment.
in #6083 the test runner was renamed to libgit2_tests,
but not all references to the old name were updated.
this change changes all of them to use the new name.