- 16 Aug, 2017 4 commits
-
-
As soon as we split up our CMakeBuild.txt build instructions, we will be unable to simply link against the git2 library's precompiled header from other targets. To avoid this future breakage, create a new precompiled header for our test suite. Next to being compatible with the split, this enables us to also include additional files like the clar headers, which may help speeding up compilation of the test suite.
Patrick Steinhardt committed -
Currently, we're compiling our library code twice, once as part of the libgit2 library and once for the libgit2_clar executable. Since CMake 2.8.8, there exists a new library type OBJECT, which represents an intermediate target which can then subsequently be used when linking several targets against the same set of objects. Use an OBJECT library to create an internal library for linking. This new target is only used on CMake v2.8.8 or newer. As CMake 3.0 changed the way how generator expressions are evaluated when accessing properties, we need to enable CMake policy 0051 to keep `IDE_SPLIT_SOURCES` functioning.
Patrick Steinhardt committed -
Once upon a time, the `CLAR_RESOURCES` variable was intended to set the `CLAR_RESOURCES` define. But actually, the define uses a wrong variable name by accident, hinting that its value cannot actually be used at all, as it is empty. Searching through the code base confirms the guess that the define is not used at all. Remove both the variable and definition.
Patrick Steinhardt committed -
While we already make use of the variable `${CMAKE_THREAD_LIBS_INIT}`, it is actually undefined due to us never including the "FindThreads" module in the CMakeLists.txt. It is rather curious as to why this has never triggered any error up to now, but it does in fact result in linking errors on some Unix platforms as soon as we split up our build instructions into multiple files. Fix the issue now to avoid future breakage by including the "FindThreads" module.
Patrick Steinhardt committed
-
- 15 Aug, 2017 1 commit
-
-
Include fixups
Edward Thomson committed
-
- 14 Aug, 2017 4 commits
-
-
Docs: Fix inline comments for git_diff_hunk
Edward Thomson committed -
oid: use memcmp in git_oid__hashcmp
Edward Thomson committed -
sha1_lookup: drop sha1_entry_pos function
Edward Thomson committed -
sha1_position: convert do-while to while
Edward Thomson committed
-
- 11 Aug, 2017 1 commit
-
-
Alpha committed
-
- 09 Aug, 2017 3 commits
-
-
The open-coded version was inherited from git.git. But it turns out it was based on an older version of glibc, whose memcmp was not very optimized. Modern glibc does much better, and some compilers (like gcc 7) can even inline the memcmp into a series of multi-byte xors. Upstream is switching to using memcmp in git/git@0b006014c87f400bd9a86267ed30fd3e7b383884.
Jeff King committed -
This was pulled over from git.git, and is an experiment in making binary-searching lists of sha1s faster. It was never compiled by default (nor was it used upstream by default without a special environment variable). Unfortunately, it is actually slower in practice, and upstream is planning to drop it in git/git@f1068efefe6dd3beaa89484db5e2db730b094e0b (which has some timing results). It's worth doing the same here for simplicity.
Jeff King committed -
If we enter the sha1_position() function with "lo == hi", we have no elements. But the do-while loop means that we'll enter the loop body once anyway, picking "mi" at that same value and comparing nonsense to our desired key. This is unlikely to match in practice, but we still shouldn't be looking at the memory in the first place. This bug is inherited from git.git; it was fixed there in e01580cfe01526ec2c4eb4899f776a82ade7e0e1.
Jeff King committed
-
- 31 Jul, 2017 2 commits
-
-
patch_generate: represent buffers as void pointers
Edward Thomson committed -
Remove unused 'sys/remote.h' header
Edward Thomson committed
-
- 30 Jul, 2017 3 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
Edward Thomson committed
-
- 28 Jul, 2017 2 commits
-
-
tests: rebase::submodule: verify initialization method calls
Edward Thomson committed -
Some return codes for functions which may fail are not being checked in `test_rebase_submodule__initialize`. This may lead us to not notice errors when initializing the environment and would possibly result in either memory corruption or segfaults as soon as any of the initialization steps fails. Fix this by wrapping these function calls into `cl_git_pass`.
Patrick Steinhardt committed
-
- 27 Jul, 2017 1 commit
-
-
tests: rewrite rebase-submodule .gitmodule file
Edward Thomson committed
-
- 26 Jul, 2017 6 commits
-
-
tsort: remove idempotent conditional assignment
Edward Thomson committed -
Build with patched libcurl
Edward Thomson committed -
win32: provide fast-path for retrying filesystem operations
Edward Thomson committed -
When using the `do_with_retries` macro for retrying filesystem operations in the posix emulation layer, allow the remediation function to return `GIT_RETRY`, meaning that the error was believed to be remediated, and the operation should be retried immediately, without a sleep. This is a slightly more general solution to the problem fixed in #4312.
Edward Thomson committed -
Carson Howard committed
-
Fixed an issue where the retry logic on p_unlink sleeps before it tries setting a file to write mode causing unnecessary slowdown.
Carson Howard committed
-
- 25 Jul, 2017 1 commit
-
-
Etienne Samson committed
-
- 24 Jul, 2017 4 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
Edward Thomson committed
-
Ubuntu trusty has a bug in curl when using NTLM credentials in a proxy, dereferencing a null pointer and causing segmentation faults. Use a custom-patched version of libcurl that avoids this issue.
Edward Thomson committed
-
- 21 Jul, 2017 1 commit
-
-
The conditional `run < minrun` can never be true directly after assigning `run = minrun`. Remove it to avoid confusion.
Patrick Steinhardt committed
-
- 20 Jul, 2017 1 commit
-
-
Fixes #4274
Etienne Samson committed
-
- 19 Jul, 2017 2 commits
-
-
Configuration file fixes with includes
Edward Thomson committed -
Patch ID calculation
Edward Thomson committed
-
- 15 Jul, 2017 4 commits
-
-
Modifying variables pulled in by an included file currently succeeds, but it doesn't actually do what one would expect, as refreshing the configuration will cause the values to reappear. As we are currently not really able to support this use case, we will instead just return an error for deleting and setting variables which were included via an include.
Patrick Steinhardt committed -
Right now, we have multiple call sites which initialize a `reader` structure. As the structure is only actually used inside of `config_read`, we can instead just move the reader inside of the `config_read` function. Instead, we can just pass in the configuration file into `config_read`, which eases code readability.
Patrick Steinhardt committed -
Currently, we only re-parse the top-level configuration file when it has changed itself. This can cause problems when an include is changed, as we were not updating all values correctly. Instead of conditionally reparsing only refreshed files, the logic becomes much clearer and easier to follow if we always re-parse the top-level configuration file when either the file itself or one of its included configuration files has changed on disk. This commit implements this logic. Note that this might impact performance in some cases, as we need to re-read all configuration files whenever any of the included files changed. It could increase performance to just re-parse include files which have actually changed, but this would compromise maintainability of the code without much gain. The only case where we will gain anything is when we actually use includes and when only these includes are updated, which will probably be quite an unusual scenario to actually be worthwhile to optimize.
Patrick Steinhardt committed -
The backend passed to `config_read` is never actually used anymore, so we can remove it from the function and the `parse_data` structure.
Patrick Steinhardt committed
-