- 27 Nov, 2019 2 commits
-
-
Tracing is meant to be extremely low-impact when not enabled. We currently ship no tracing calls in libgit2, but if / when we do, the tracing infrastructure is created to skip tracing as quickly as possible. It should compile to a simple test when tracing is off. Thus, there's on reason to not enable it by default.
Edward Thomson committed -
CI Build Updates
Edward Thomson committed
-
- 24 Nov, 2019 12 commits
-
-
Edward Thomson committed
-
Provide usage hints to valgrind. We trust the data coming back from OpenSSL to have been properly initialized. (And if it has not, it's an OpenSSL bug, not a libgit2 bug.) We previously took the `VALGRIND` option to CMake as a hint to disable mmap. Remove that; it's broken. Now use it to pass on the `VALGRIND` definition so that sources can provide valgrind hints.
Edward Thomson committed -
valgrind will warn that OpenSSL will use undefined data in connect/read when talking to certain other TLS stacks. Thankfully, this only seems to occur when gcc is the compiler, so hopefully valgrind is just misunderstanding an optimization. Regardless, suppress this warning.
Edward Thomson committed -
We currently talk to Azure Repos for executing an online test (online::clone::path_whitespace). Add a simpler test to talk to Azure Repos to make it obvious that strange test failures are not likely the whitespace in the path, but actually a function of talking to Azure Repos itself.
Edward Thomson committed -
Our docker builds are getting expensive, let's cache some of this.
Edward Thomson committed -
Edward Thomson committed
-
The valgrind in the PPA is broken and ignores `--exit-errorcode`. Build and install our own.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
Use a multi-stage docker build so that we can cache early stages and not need to download the apt-provided dependencies during every build (when only later stages change).
Edward Thomson committed -
Deleting the apt cache can be helpful for reducing the size of a container, but since we don't push it anywhere, it only hinders our ability to debug problems while working on the container. Keep it.
Edward Thomson committed -
Edward Thomson committed
-
- 23 Nov, 2019 2 commits
-
-
libcrypto will read uninitialized memory as entropy. Suppress warnings from this behavior.
Edward Thomson committed -
The lsb-release command is missing on our images; just show the information from the file instead of relying on it.
Edward Thomson committed
-
- 22 Nov, 2019 1 commit
-
-
Provide a sane default for `CMAKE_GENERATOR` in the build script so that it can be invoked without having to set that in the environment.
Edward Thomson committed
-
- 16 Nov, 2019 3 commits
-
-
patch_parse: use paths from "---"/"+++" lines for binary patches
Edward Thomson committed -
Follow 308 redirect in WinHTTP transport
Edward Thomson committed -
fileops: correct error return on p_lstat failures when mkdir
Edward Thomson committed
-
- 10 Nov, 2019 1 commit
-
-
For some patches, it is not possible to derive the old and new file paths from the patch header's first line, most importantly when they contain spaces. In such a case, we derive both paths from the "---" and "+++" lines, which allow for non-ambiguous parsing. We fail to use these paths when parsing binary patches without data, though, as we always expect the header paths to be filled in. Fix this by using the "---"/"+++" paths by default and only fall back to header paths if they aren't set. If neither of those paths are set, we just return an error. Add two tests to verify this behaviour, one of which would have previously caused a segfault.
Patrick Steinhardt committed
-
- 09 Nov, 2019 1 commit
-
-
IIRC I got a strange return once from lstat, which translated in a weird error class/message being reported. As a safety measure, enforce a -1 return in that case.
Etienne Samson committed
-
- 06 Nov, 2019 3 commits
-
-
config_mem: implement support for snapshots
Edward Thomson committed -
patch_parse: fix segfault when header path contains whitespace only
Edward Thomson committed -
Similar as in commit dadbb33b (Fix crash if snapshotting a config_snapshot, 2019-11-01), let's implement snapshots for in-memory configuration entries. As this deletes more code than it adds, it doesn't make any sense to not allow for this and allows users to treat config backends mostly the same.
Patrick Steinhardt committed
-
- 05 Nov, 2019 10 commits
-
-
When parsing header paths from a patch, we reject any patches with empty paths as malformed patches. We perform the check whether a path is empty before sanitizing it, though, which may lead to a path becoming empty after the check, e.g. if we have trimmed whitespace. This may lead to a segfault later when any part of our patching logic actually references such a path, which may then be a `NULL` pointer. Fix the issue by performing the check after sanitizing. Add tests to catch the issue as they would have produced a segfault previosuly.
Patrick Steinhardt committed -
config_file: fix race when creating an iterator
Patrick Steinhardt committed -
When creating a configuration file iterator, then we first refresh the backend and then afterwards duplicate all refreshed configuration entries into the iterator in order to avoid seeing any concurrent modifications of the entries while iterating. The duplication of entries is not guarded, though, as we do not increase the refcount of the entries that we duplicate right now. This opens us up for a race, as another thread may concurrently refresh the repository configuration and thus swap out the current set of entries. As we didn't increase the refcount, this may lead to the entries being free'd while we iterate over them in the first thread. Fix the issue by properly handling the lifecycle of the backend's entries via `config_file_entries_take` and `git_config_entries_free`, respectively.
Patrick Steinhardt committed -
The function to take a reference to the config file's config entries currently returns the reference via return value. Due to this, it's harder than necessary to integrate into our typical coding style, as one needs to make sure that a proper error code is set before erroring out from the caller. This bites us in `config_file_delete`, where we call `goto out` directly when `config_file_entries_take` returns `NULL`, but we actually forget to set up the error code and thus return success. Fix the issue by refactoring the function to return an error code and pass the reference via an out-pointer.
Patrick Steinhardt committed -
Patrick Steinhardt committed
-
As with the predecessing commit, this commit renames backend functions of the configuration file backend. This helps to clearly separate functionality and also to be able to see from backtraces which backend is currently in use.
Patrick Steinhardt committed -
The configuration snapshot backend has been extracted from the old files backend back in 2bff84ba (config_file: separate out read-only backend, 2019-07-26). To keep code churn manageable, the local functions weren't renamed yet and thus still have references to the old diskfile backend. Rename them accordingly to make them easier to understand.
Patrick Steinhardt committed -
Fix crash if snapshotting a config_snapshot
Patrick Steinhardt committed -
fix a bug introduced in 8a23597b
Patrick Steinhardt committed -
romkatv committed
-
- 02 Nov, 2019 1 commit
-
-
reflogs: fix behaviour around reflogs with newlines
Edward Thomson committed
-
- 01 Nov, 2019 2 commits
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
commit: verify objects exist in git_commit_with_signature
Edward Thomson committed
-
- 30 Oct, 2019 2 commits
-
-
There can be a significant difference between the system where we created the buffer (if at all) and when the caller provides us with the contents of a commit. Verify that the commit we are being asked to create references objects which do exist in the target repository.
Carlos Martín Nieto committed -
There can be a significant difference between the system where we created the buffer (if at all) and when the caller provides us with the contents of a commit. Provide some test cases (we have to adapt the existing ones because they refer to trees and commits which do not exist).
Carlos Martín Nieto committed
-