- 26 Jul, 2018 14 commits
-
-
Edward Thomson committed
-
On Linux (where we run valgrind) allocate a smaller buffer, but still an insanely large size. This will cause malloc to fail but will not cause valgrind to report a likely error with a negative-sized malloc. Keep the original buffer size on non-Linux platforms: this is well-tested on them and changing it may be problematic. On macOS, for example, using the new size causes `malloc` to print a warning to stderr.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
Edward Thomson committed
-
Script to set up dependencies on a macOS build system.
Edward Thomson committed -
Sets up a linux host to prepare for a build.
Edward Thomson committed -
Refactor citest.sh to enable local testing by developers.
Edward Thomson committed -
Edward Thomson committed
-
Add citest.ps1 PowerShell script to run the tests.
Edward Thomson committed -
Edward Thomson committed
-
Simplify the names for the tests, removing the unnecessary "libgit2-clar" prefix. Make "all" the new default test run, and include the online tests by default (since HTTPS should always be enabled). For the CI tests, create an offline-only test, then the various online tests.
Edward Thomson committed -
mbedtls: remove unused variable "cacert"
Edward Thomson committed -
In commit 382ed1e8 (mbedtls: load default CA certificates, 2018-03-29), the function `git_mbedtls_stream_global_init` was refactored to call out to `git_mbedtls__set_cert_location` instead of setting up the certificates itself. The conversion forgot to remove the now-unused "cacert" variable, which is now only getting declared to be free'd at the end of the function. Remove it.
Patrick Steinhardt committed
-
- 23 Jul, 2018 1 commit
-
-
Squash some leaks
Edward Thomson committed
-
- 21 Jul, 2018 4 commits
-
-
Edward Thomson committed
-
Instead of allocating the ciphers_list, make it a static array. This prevents us from leaking it or having to manage its memory.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
- 20 Jul, 2018 5 commits
-
-
Don't just free the spec vector, also free the specs themselves.
Edward Thomson committed -
Don't just free the push status structure, actually free the strings that were strdup'd into the struct as well.
Edward Thomson committed -
Free the url field when resetting the stream to avoid leaking it.
Edward Thomson committed -
Add a checkout example
Patrick Steinhardt committed -
Assorted Coverity fixes
Patrick Steinhardt committed
-
- 19 Jul, 2018 1 commit
-
-
Remove GIT_PKT_PACK entirely
Patrick Steinhardt committed
-
- 17 Jul, 2018 1 commit
-
-
Etienne Samson committed
-
- 16 Jul, 2018 1 commit
-
-
ignore: improve `git_ignore_path_is_ignored` description Git analogy
Edward Thomson committed
-
- 15 Jul, 2018 3 commits
-
-
alloc: don't overwrite allocator during init if set
Carlos Martín Nieto committed -
Nelson Elhage committed
-
If the allocator has been set before we the library is initialised, we would replace that setting with the standard allocator contrary to the user's wishes.
Carlos Martín Nieto committed
-
- 14 Jul, 2018 1 commit
-
-
C90 standard compliance
Edward Thomson committed
-
- 13 Jul, 2018 6 commits
-
-
In attempt to provide adequate Git command analogy in regards to ignored files handling, `git_ignore_path_is_ignored` description mentions doing `git add .` on directory containing the file, and whether the file in question would be added or not - but behavior of the two matches for untracked files only, making the comparison misleading in general sense. For tracked files, Git doesn't subject them to ignore rules, so even if a rule applies, `git add .` would actually add the tracked file changes to index, while `git_ignore_path_is_ignored` would still consider the file being ignored (as it doesn't check the index, as documented). Let's provide `git check-ignore --no-index` as analogous Git command example instead, being more aligned with what `git_ignore_path_is_ignored` is about, no matter if the file in question is already tracked or not. See issue #4720 (git_ignore_path_is_ignored documentation misleading?, 2018-07-10)[1] for additional information. [1] https://github.com/libgit2/libgit2/issues/4720
Igor Djordjevic committed -
While the aim of libgit2 was to conform to C90 code, we never instructed the compiler to enforce C90 compliance. Thus, quite a few violations were able to get into our code base, which have been removed with the previous commits. As we are now able to build libgit2 with C90 enforced, we can set the C_STANDARD property for our own build targets. Note that we explicitly avoid setting the C standard for our third-party dependencies. At least the zlib target does not build with C90 enforced, and we do not want to fix them by deviating from upstream. Thus we simply enforce no standard for them.
Patrick Steinhardt committed -
The mbedtls headers make direct use of the `inline` attribute to instruct the compiler to inline functions. As this function is not C90 compliant, this can cause the compiler to error as soon as any of these files is included and the `-std=c90` flag is being added. The mbedtls headers declaring functions as inline always have a prelude which define `inline` as a macro in case it is not yet defined. Thus, we can easily replace their define with our own define, which simply copies the logic of our own `GIT_INLINE` macro.
Patrick Steinhardt committed -
While we want to enforce strict C90 mode, this may cause issues with system provided header files which are themselves not strictly conforming. E.g. if a system header has C++ style comments, a compiler in strict C90 mode would produce an error and abort the build. As the user most likely doesn't want to change the system header, this would completely break the build on such systems. One example of this is mbedtls, which provides such header files. The problem can be worked around by distinguishing between system-provided and project-provided include directories. When adding include directories via "-isystem" instead of "-I", the compiler will skip certain checks and print out less warnings. To use system includes, we can simply add the "SYSTEM" flag to CMake's `INCLUDE_DIRECTORIES` and `TARGET_INCLUDE_DIRECTORIES` functions. Note that we have to split the include directories into two variables because of this, as we definitely still want to check for all warnings produced by our own header files.
Patrick Steinhardt committed -
C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
Patrick Steinhardt committed -
ISO C90 does not specify the `inline` attribute, and as such we cannot use it in our code. While we already use `__inline` when building in Microsoft Visual Studio, we should also be using the `__inline__` attribute from GCC/Clang. Otherwise, if we're using neither MSVC nor GCC/Clang, we should simply avoid using `inline` at all and just define functions as static. This commit adjusts our own `GIT_INLINE` macro as well as the inline macros specified by khash and xdiff. This allows us to enable strict C90 mode in a later commit.
Patrick Steinhardt committed
-
- 09 Jul, 2018 1 commit
-
-
Delta OOB access
Edward Thomson committed
-
- 08 Jul, 2018 1 commit
-
-
streams: report OpenSSL errors if global init fails
Edward Thomson committed
-
- 07 Jul, 2018 1 commit
-
-
Etienne Samson committed
-