- 28 Oct, 2017 2 commits
-
-
Ask for SSH credentials again when passphrase is wrong
Edward Thomson committed -
examples: remove Makefile
Edward Thomson committed
-
- 20 Oct, 2017 4 commits
-
-
When trying to decode the private key it looks like LibSSH2 returns a LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED when the passphrase is incorrect.
Curtis Vogt committed -
Back in the days when libgit2 was still young, libgit2 was using plain Makefiles as build infrastructure. We later changed that to instead use the CMake build system to make cross-platform development easier. In the process, we forgot to remove the Makefile from our examples directory, which is fixed by this commit here. Furthermore, remove the accompanying .gitignore file, which ignores build outputs. As we do out-of-tree builds only nowadays, no output is generated in that directory anymore.
Patrick Steinhardt committed -
cmake: use project-relative binary and source directories
Edward Thomson committed -
Due to our split of CMake files into multiple modules, we had to replace some uses of the `${CMAKE_CURRENT_SOURCE_DIR}` and `${CMAKE_CURRENT_BINARY_DIR}` variables and replace them with `${CMAKE_SOURCE_DIR}` and `${CMAKE_BINARY_DIR}`. This enabled us to still be able to refer to top-level files when defining build instructions inside of a subdirectory. When replacing all variables, it was assumed that the absolute set of variables is always relative to the current project. But in fact, this is not the case, as these variables always point to the source and binary directory as given by the top-levl project. So the change actually broke the ability to include libgit2 directly as a subproject, as source files cannot be found anymore. Fix this by instead using project-specific source and binary directories with `${libgit2_SOURCE_DIR}` and `${libgit2_BINARY_DIR}`.
Patrick Steinhardt committed
-
- 19 Oct, 2017 1 commit
-
-
Fix compilation for CMake versions 3.0.x where x >= 1
Patrick Steinhardt committed
-
- 14 Oct, 2017 1 commit
-
-
Apparently policy CMP0015 was added in CMake 3.1. With CMake 3.0.2, the build was failing with CMake Error at CMakeLists.txt:18 (CMAKE_POLICY): Policy "CMP0051" is not known to this version of CMake. This patch makes it work.
Michael Haggerty committed
-
- 09 Oct, 2017 9 commits
-
-
cmake: use static dependencies when building static libgit2
Edward Thomson committed -
cmake: fix linking in Xcode with object libraries only
Edward Thomson committed -
transports: smart: fix memory leak when skipping symbolic refs
Edward Thomson committed -
tests: checkout::tree: verify status entrycount changes on chmod
Carlos Martín Nieto committed -
CMake is unable to generate a correct Xcode project when trying to link libraries with only object libraries as its input. As our new build infrastructure makes heavy use of object libraries now, this affects our libgit2 library target, as well, leading to linking errors. Fix the issue by adding a dummy file to the libgit2 objects. As we always have the "features.h" header ready which contains defines only, we can simply link it into the resulting library without any effect whatsoever. This fixes building with Xcode.
Patrick Steinhardt committed -
While we verify that we have no mode changes after calling `git_checkout_tree`, we do not verify that the `p_chmod` calls actually resulted in a changed entry. While we should assume that this works due to separate tests for the status list, we should test for the change being listed to avoid programming errors in the test.
Patrick Steinhardt committed -
There are multiple locations where we have the same code to check whether the count of status list entries of a repository matches an expected number. Extract that into a common function.
Patrick Steinhardt committed -
Checkout typechange-only deltas
Patrick Steinhardt committed -
When we setup the revision walk for negotiating references with a remote, we iterate over all references, ignoring tags and symbolic references. While skipping over symbolic references, we forget to free the looked up reference, resulting in a memory leak when the next iteration simply overwrites the variable. Fix that issue by freeing the reference at the beginning of each iteration and collapsing return paths for error and success.
Patrick Steinhardt committed
-
- 07 Oct, 2017 7 commits
-
-
Plug some leaks in curl's proxy handling
Edward Thomson committed -
Test that we can successfully force checkout a target when the file contents are identical, but the mode has changed.
Edward Thomson committed -
On Windows, we do not support file mode changes, so do not test for type changes between the disk and tree being checked out. We could have false positives since the on-disk file can only have an (effective) mode of 0100644 since NTFS does not support executable files. If the tree being checked out did have an executable file, we would erroneously decide that the file on disk had been changed.
Edward Thomson committed -
Carlos Martín Nieto committed
-
Fix Issue #4047 Check return codes and free objects
Edward Thomson committed -
travis: add custom apt sources
Edward Thomson committed -
Douglas Swanson committed
-
- 06 Oct, 2017 9 commits
-
-
remote: add typedef to normalize push_update_reference callback
Edward Thomson committed -
refs: do not use peeled OID if peeling to a tag
Edward Thomson committed -
Move back to Travis's VM infrastructure for efficiency.
Edward Thomson committed -
When performing a forced checkout, treat files as modified when the workdir or the index is identical except for the mode. This ensures that force checkout will update the mode to the target. (Apply this check for regular files only, if one of the items was a file and the other was another type of item then this would be a typechange and handled independently.)
Edward Thomson committed -
Very many callbacks in libgit2 have some sort of typedef to normalize the name at git_<name_of_operation>_cb. Add a typedef for push_update_references in the remote so the name follows the same conventions.
Carson Howard committed -
Document that a commit is not a descendant of itself
Patrick Steinhardt committed -
Jacob Wahlgren committed
-
Use SOCK_CLOEXEC when creating sockets
Patrick Steinhardt committed -
If a reference stored in a packed-refs file does not directly point to a commit, tree or blob, the packed-refs file will also will include a fully-peeled OID pointing to the first underlying object of that type. If we try to peel a reference to an object, we will use that peeled OID to speed up resolving the object. As a reference for an annotated tag does not directly point to a commit, tree or blob but instead to the tag object, the packed-refs file will have an accomodating fully-peeled OID pointing to the object referenced by that tag. When we use the fully-peeled OID pointing to the referenced object when peeling, we obviously cannot peel that to the tag anymore. Fix this issue by not using the fully-peeled OID whenever we want to peel to a tag. Note that this does not include the case where we want to resolve to _any_ object type. Existing code may make use from the fact that we resolve those to commit objects instead of tag objects, even though that behaviour is inconsistent between packed and loose references. Furthermore, some tests of ours make the assumption that we in fact resolve those references to a commit.
Patrick Steinhardt committed
-
- 04 Oct, 2017 1 commit
-
-
Andreas Smas committed
-
- 28 Sep, 2017 2 commits
-
-
Static linking for bundled deps
Carlos Martín Nieto committed -
The block in the script installs the packages if we're _not_ on Precise. This was dropped in c17c3f8a ("travis: drop support for Ubuntu Precise") in error.
Carlos Martín Nieto committed
-
- 27 Sep, 2017 3 commits
-
-
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
When we duplicate a user-provided options struct, we're stuck with freeing the url in it. In case we add stuff to the proxy struct, let's add a function in which to put the logic.
Carlos Martín Nieto committed
-
- 22 Sep, 2017 1 commit
-
-
CMake allows us to build a static library by simply setting the variable `BUILD_SHARED_LIBS` to `OFF`. While this causes us to create a static libgit2.a archive, it will not automatically cause CMake to only locate static archives when searching for dependencies. This does no harm in case of building our libgit2.a, as we do not want to include all required dependencies in the resulting archive anyway. Instead, we ask users of a static libgit2.a to link against the required set of static archives themselves, typically aided by the libgit2.pc file. Where it does cause harm, though, is when we build the libgit2_clar test suite. CMake has happily populated our LIBGIT2_LIBS variable with shared libraries, and so linking the final libgit2_clar test does not do the right thing. It will simply ignore those shared libraries, we end up with a test suite with undefined symbols. To fix the issue, we can instruct CMake to only locate libraries with a certain suffix. As static libraries are typically identifiable by their ".a" suffix on Unix-based systems, we can instruct CMake to only locate libraries with this suffix to restrict it from finding any shared libraries. This fixes building a static libgit2_clar test suite. Note that this ignores the problem on Windows. The problem here is that we cannot even distinguish static and dynamic libraries by only inspecting their suffix. So we just ignore the problem on Windows, for now.
Patrick Steinhardt committed
-