- 21 Nov, 2020 4 commits
-
-
Edward Thomson committed
-
The win32 leakchecking system is now named win32_leakcheck. Update the allocator to match.
Edward Thomson committed -
Move leak check initialization into git_win32_leakcheck_global_init, and call it on library initialization.
Edward Thomson committed -
msvc crtdbg is a mouthfull that is not particularly indicative of what it does. Let's rename it to "win32 leakcheck".
Edward Thomson committed
-
- 02 Nov, 2020 1 commit
-
-
This change avoids using the `(void)0` construct for some of the mutex `#define`s, since that makes the "return type" of those "functions" to be `void` instead of `int`.
lhchavez committed
-
- 25 Oct, 2020 10 commits
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
Edward Thomson committed
-
Edward Thomson committed
-
Provide a function that can check remote name validity but can also signal when an error occurs. Use the name "name_is_valid", which is more suggestive of checking a given name, rather than "is_valid_name", which suggests that the function checks the validity of the current remote's name.
Edward Thomson committed -
Disambiguate invalid specifications in `git_refspec__parse` so that callers can determine the difference between invalid specifications and actual errors. No call sites wil propagagte this new error message to an end-user, so there is no user-facing API change.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
Provide a function that can check reference name validity but can also signal when an error occurs. Use the name "name_is_valid", which is more suggestive of checking a given name, rather than "is_valid_name", which suggests that the function checks the validity of the current reference's name.
Edward Thomson committed -
Move `git_reference__is_valid_name` to `git_reference__name_is_valid`, which returns errors and sets an out boolean parameter.
Edward Thomson committed
-
- 14 Oct, 2020 1 commit
-
-
Edward Thomson committed
-
- 13 Oct, 2020 1 commit
-
-
This should allow folks that build in non-thread-safe environments to still be able to build the library. Fixes: #5663
lhchavez committed
-
- 12 Oct, 2020 1 commit
-
-
This change: * Increases MY_ROW_LIMIT to 2M, since it has been failing in #5595's tests since it's _super_ close to the limit. * Calls `git_repository_free()` on a `git_repository` that was being leaked only in Windows. * Marks the global `git_repository` on `tests/repo/init.c` as `NULL` after being freed to make any accidental access more noisy. * Uses `cl_assert_equal_i()` in `test_trace_windows_stacktrace__leaks` to make the test failures more actionable. * Renames the globals in `tests/repo/init.c` so that they don't start with an underscore.
lhchavez committed
-
- 11 Oct, 2020 10 commits
-
-
Edward Thomson committed
-
Now that we've identified that our global settings really aren't global at all, and refactored the library to match that, change global.c to libgit2.c, which is especially nice since the prefix of the functions matches the filename.
Edward Thomson committed -
Provide a mechanism for system components to register for initialization and shutdown of the libgit2 runtime.
Edward Thomson committed -
We want to store a pointer to emulate `pthread_exit` on Windows. Do this within the threading infrastructure so that it could potentially be re-used outside of the context of libgit2 itself.
Edward Thomson committed -
Our "global initialization" has accumulated some debris over the years. It was previously responsible for both running the various global initializers (that set up various subsystems) _and_ setting up the "global state", which is actually the thread-local state for things like error reporting. Separate the thread local state out into "threadstate". Use the normal subsystem initialization functions that we already have to set it up. This makes both the global initialization system and the threadstate system simpler to reason about.
Edward Thomson committed -
Ensure that we can allocate the error message buffer. In keeping with our typical policiess, we allow (small) memory leaks in the case where we're out of memory.
Edward Thomson committed -
Move the mwindow mutex into the mwindow code itself, initializing it in the mwindow global initialization function instead of in the global initializer.
Edward Thomson committed -
Move the settings global data teardown into its own separate function, instead of intermingled with the global state.
Edward Thomson committed -
Move the MSVC C runtime debugging bits into the allocator's global init function.
Edward Thomson committed -
Instead of treating win32 thread initialization specially in the win32 git_libgit2_init function, add a git_global_threads_init function.
Edward Thomson committed
-
- 08 Oct, 2020 2 commits
-
-
Instead, globally initialize the system page size.
lhchavez committed -
This change: * Starts using GCC's and clang's `__atomic_*` intrinsics instead of the `__sync_*` ones, since the former supercede the latter (and can be safely replaced by their equivalent `__atomic_*` version with the sequentially consistent model). * Makes `git_atomic64`'s value `volatile`. Otherwise, this will make ThreadSanitizer complain. * Adds ways to load the values from atomics. As it turns out, unsynchronized read are okay only in some architectures, but if we want to be correct (and make ThreadSanitizer happy), those loads should also be performed with the atomic builtins. * Fixes two ThreadSanitizer warnings, as a proof-of-concept that this works: - Avoid directly accessing `git_refcount`'s `owner` directly, and instead makes all callers go through the `GIT_REFCOUNT_*()` macros, which also use the atomic utilities. - Makes `pool_system_page_size()` race-free. Part of: #5592
lhchavez committed
-
- 07 Oct, 2020 1 commit
-
-
Eric Huss committed
-
- 06 Oct, 2020 2 commits
-
-
The info pointer was allocated with git__malloc, so needs to be free'd with git__free. This bug can lurk pretty easily since if there's no custom allocator this is fine.
Dan Tull committed -
Update `refs/remotes/origin/HEAD` as a symbolic link to the remote's default branch.
Edward Thomson committed
-
- 05 Oct, 2020 1 commit
-
-
This change is the first in a series to add support for git's multi-pack-index. This should speed up large repositories significantly. Part of: #5399
lhchavez committed
-
- 04 Oct, 2020 1 commit
-
-
Fix #5565 Pre-Android 5 did not implement a virtual filesystem atop FAT partitions for Unix permissions, which causes chmod to fail. However, Unix permissions have no effect on Android anyway as file permissions are not actually managed this way, so treating it as a no-op across all Android is safe.
kevinlul committed
-
- 18 Sep, 2020 4 commits
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
When trying to the template dir, we pass in a `NULL` pointer for the filename. That's perfectly fine, but if we're failing to find the template directory then we'll creat an error message with the `NULL` pointer passed in. Fix the issue by setting different error messages based on whether the filename is given or not. This even makes sense, as we're not searching for a file in case we have no `name`, but for a directory. So the error would've been misleading anyway.
Patrick Steinhardt committed -
When building libgit2 with the release build type, then GCC complains about mode being potentially uninitialized. While this seems to be a false positive, let's silence this warning by zero-initializing the mode.
Patrick Steinhardt committed -
The `signature` variable in `git_reference_rename` isn't initialized and neither does `git_reference__log_signature` always do. So if the latter function fails, we'll call `git_signature_free` on this unininitialized variable. Fix the issue by initializing the pointer with `NULL`.
Patrick Steinhardt committed
-
- 16 Sep, 2020 1 commit
-
-
Drew DeVault committed
-