summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: use trusty-amd64 for openssl and mbedtlsethomson/qemu-buildEdward Thomson2018-10-211-4/+4
| | | | | | We don't need two separate docker images for OpenSSL and mbedTLS. They've been combined into a single image `trusty-amd64` that supports both.
* tests: don't run buf::oom on 32-bit systemsEdward Thomson2018-10-211-5/+9
| | | | | | On a 32-bit Linux systems, the value large enough to make malloc guarantee a failure is also large enough that valgrind considers it "fishy". Skip this test on those systems entirely.
* valgrind: extend the suppressions fileEdward Thomson2018-10-211-1/+41
| | | | Newer dependencies means newer places to leak!
* ci: use bionic for non-amd64 buildsEdward Thomson2018-10-211-12/+12
| | | | | | Use Bionic so that we have a modern libssh2 (for communicating with GitHub). We've ported fixes to our Trusty-based amd64 images, but maintaining patches for multiple platforms is heinous.
* ci: introduce nightly x86 linux buildsEdward Thomson2018-10-211-0/+28
|
* ci: bind specifically to localhost for proxyEdward Thomson2018-10-211-2/+2
| | | | | | Bind the proxy specifically to 127.0.0.1 instead of all addresses. This is not strictly necessary for operations, but having a potentially open proxy on a network is not a good idea.
* ci: introduce nightly arm docker buildsEdward Thomson2018-10-212-0/+32
| | | | | | | | | | | Use multiarch arm32 and arm64 docker images to run Xenial-based images for those platforms. We can support all the tests on ARM32 and 64 _except_ the proxy-based tests. Our proxy on ARM seems regrettably unstable, either due to some shoddy dependencies (with native code?) or the JREs themselves. Run these platforms as part of our nightly builds; do not run them during pull request or CI validation.
* ci: reorganize naming for consistencyEdward Thomson2018-10-211-12/+12
|
* ci: move configuration yaml to its own directoryEdward Thomson2018-10-215-9/+9
| | | | | As the number of each grow, separate the CI build scripts from the YAML definitions.
* Merge pull request #4852 from libgit2/ethomson/unc_pathsEdward Thomson2018-10-206-97/+172
|\ | | | | Win32 path canonicalization refactoring
| * win32: refactor `git_win32_path_remove_namespace`ethomson/unc_pathsEdward Thomson2018-10-191-25/+36
| | | | | | | | | | | | | | | | | | | | | | Update `git_win32_path_remove_namespace` to disambiguate the prefix being removed versus the prefix being added. Now we remove the "namespace", and (may) add a "prefix" in its place. Eg, we remove the `\\?\` namespace. We remove the `\\?\UNC\` namespace, and replace it with the `\\` prefix. This aids readability somewhat. Additionally, use pointer arithmetic instead of offsets, which seems to also help readability.
| * win32: more tests for `git_win32_remove_path`Edward Thomson2018-10-191-0/+28
| |
| * win32: rename `git_win32__canonicalize_path`Edward Thomson2018-10-196-113/+116
| | | | | | | | | | | | | | | | | | | | | | The internal API `git_win32__canonicalize_path` is far, far too easily confused with the internal API `git_win32_path_canonicalize`. The former removes the namespace prefix from a path (eg, given `\\?\C:\Temp\foo`, it returns `C:\Temp\foo`, and given `\\?\UNC\server\share`, it returns `\\server\share`). As such, rename it to `git_win32_path_remove_namespace`. `git_win32_path_canonicalize` remains unchanged.
| * Fix comment style and update test codeGabriel DeBacker2018-10-041-4/+7
| |
| * Fix issue with path canonicalization for Win32 pathsGabriel DeBacker2018-09-302-2/+32
| |
* | Merge pull request #4840 from libgit2/cmn/validity-tree-from-unowned-indexEdward Thomson2018-10-205-29/+58
|\ \ | | | | | | Check object existence when creating a tree from an index
| * | checkout: fix test fixture missing objectscmn/validity-tree-from-unowned-indexEdward Thomson2018-10-203-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The testrepo test fixture has an index file that's damaged, missing an object. The index previously had an entry of `src/index.c` with id 3161df8cbf3a006b4ef85be6497a0ea6bde98541, but that object was missing in the repository. This commit adds an object to the repository and updates the index to use that existing blob. Similarly, the index has an entry for `readme` with an id of 97328ac7e3bd0bcd3900cb3e7a624d71dd0df888. This can be restored from other test repositories. With these fixed, now the write tree from index tests can pass since they validate object existence.
| * | tree: unify the entry validity checksCarlos Martín Nieto2018-10-081-29/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have two similar functions, `git_treebuilder_insert` and `append_entry` which are used in different codepaths as part of creating a new tree. The former learnt to check for object existence under strict object creation, but the latter did not. This allowed the creation of a tree from an unowned index to bypass some of the checks and create a tree pointing to a nonexistent object. Extract a single function which performs these checks and call it from both codepaths. In `append_entry` we still do not validate when asked not to, as this is data which is already in the tree and we want to allow users to deal with repositories which already have some invalid data.
| * | index: add failing test for writing an invalid tree from an unowned indexCarlos Martín Nieto2018-10-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the index does not belong to any repository, we do not do any checks of the target id going in as we cannot verify that it exists. When we then write it out to a repository as a tree, we fail to perform the object existance and type-matching check that we do in other code-paths. This leads to being able to write trees which point to non-existent blobs even with strict object creation enabled.
* | | Merge branch 'issue-4203'Edward Thomson2018-10-202-1/+35
|\ \ \
| * | | merge: don't leak the index during reloadsethomson/issue-4203Edward Thomson2018-10-201-3/+4
| | | |
| * | | merge: add error handling for index reloadEtiene Dalcol2017-11-111-3/+4
| | | | | | | | | | | | | | | | Cleans up should git_repository_index or git_index_read fail
| * | | tests: add test case for index reloads on mergeEtiene Dalcol2017-11-111-0/+29
| | | | | | | | | | | | | | | | | | | | Adds a test case for the issue #4203, when diverging indexes on memory and disk cause git merge to abort with GIT_ECONFLICT
| * | | merge: reload index before git_mergeGreg Collinge2017-11-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the index in memory is different from the index on the disk, previously merge would abort with GIT_ECONFLICT. Reload the index before merging to fix this. Fixes #4203
* | | | Merge pull request #4841 from tiennou/ci/ninja-buildEdward Thomson2018-10-202-1/+4
|\ \ \ \ | | | | | | | | | | Ninja build
| * | | | ci: make the Ubuntu/OpenSSL build explicitEtienne Samson2018-10-191-0/+2
| | | | |
| * | | | ci: use Ninja on macOSEtienne Samson2018-10-192-1/+2
| | | | |
* | | | | Merge pull request #4853 from libgit2/cmn/not-opaqueEdward Thomson2018-10-191-2/+2
|\ \ \ \ \ | | | | | | | | | | | | docs: fix transparent/opaque confusion in the conventions file
| * | | | | docs: fix transparent/opaque confusion in the conventions filecmn/not-opaqueCarlos Martín Nieto2018-10-191-2/+2
|/ / / / /
* | | | | Merge pull request #4819 from libgit2/cmn/config-nonewlinePatrick Steinhardt2018-10-192-6/+56
|\ \ \ \ \ | | | | | | | | | | | | Configuration variables can appear on the same line as the section header
| * | | | | config: variables might appear on the same line as a section headercmn/config-nonewlineCarlos Martín Nieto2018-10-151-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While rare and a machine would typically not generate such a configuration file, it is nevertheless valid to write [foo "bar"] baz = true and we need to deal with that instead of assuming everything is on its own line.
| * | | | | config: add failing test for no newline after section headerCarlos Martín Nieto2018-10-151-0/+30
| |/ / / /
* | | | | Merge pull request #4849 from libgit2/cmn/expose-gitfile-checkEdward Thomson2018-10-172-38/+66
|\ \ \ \ \ | | | | | | | | | | | | path: export the dotgit-checking functions
| * | | | | path: export the dotgit-checking functionscmn/expose-gitfile-checkCarlos Martín Nieto2018-10-152-38/+66
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These checks are preformed by libgit2 on checkout, but they're also useful for performing checks in applications which do not involve checkout. Expose them under `sys/` as it's still fairly in the weeds even for this library.
* | | | | Merge pull request #4850 from libgit2/ethomson/libssh2_not_libsshEdward Thomson2018-10-171-1/+1
|\ \ \ \ \ | | | | | | | | | | | | cmake: correct comment from libssh to libssh2
| * | | | | cmake: correct comment from libssh to libssh2ethomson/libssh2_not_libsshEdward Thomson2018-10-171-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | We use libssh2. We do not use libssh. Make sure to disambiguate them correctly.
* | | | | Merge pull request #4845 from pks-t/pks/object-fuzzerCarlos Martín Nieto2018-10-157-1/+442
|\ \ \ \ \ | | | | | | | | | | | | Object parsing fuzzer
| * | | | | fuzzers: add object parsing fuzzerPatrick Steinhardt2018-10-115-0/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple fuzzer that exercises our object parser code. The fuzzer is quite trivial in that it simply passes the input data directly to `git_object__from_raw` for each of the four object types.
| * | | | | object: properly propagate errors on parsing failuresPatrick Steinhardt2018-10-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When failing to parse a raw object fromits data, we free the partially parsed object but then fail to propagate the error to the caller. This may lead callers to operate on objects with invalid memory, which will sooner or later cause the program to segfault. Fix the issue by passing up the error code returned by `parse_raw`.
| * | | | | fuzzers: initialize libgit2 in standalone driverPatrick Steinhardt2018-10-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standalone driver for libgit2's fuzzing targets makes use of functions from libgit2 itself. While this is totally fine to do, we need to make sure to always have libgit2 initialized via `git_libgit2_init` before we call out to any of these. While this happens in most cases as we call `LLVMFuzzerInitialize`, which is provided by our fuzzers and which right now always calls `git_libgit2_init`, one exception to this rule is our error path when not enough arguments have been given. In this case, we will call `git_vector_free_deep` without libgit2 having been initialized. As we did not set up our allocation functions in that case, this will lead to a segmentation fault. Fix the issue by always initializing and shutting down libgit2 in the standalone driver. Note that we cannot let this replace the initialization in `LLVMFuzzerInitialize`, as it is required when using the "real" fuzzers by LLVM without our standalone driver. It's no problem to call the initialization and deinitialization functions multiple times, though.
* | | | | | Merge commit 'afd10f0' (Follow 308 redirects)Carlos Martín Nieto2018-10-151-1/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Follow 308 redirects (as used by GitLab)Zander Brown2018-10-131-1/+2
| |/ / / /
* | | | | Merge pull request #4842 from nelhage/fuzz-config-memoryPatrick Steinhardt2018-10-124-31/+23
|\ \ \ \ \ | |_|_|/ / |/| | | | config: Port config_file_fuzzer to the new in-memory backend.
| * | | | Apply code review feedbackNelson Elhage2018-10-112-8/+5
| | | | |
| * | | | fuzzers: Port config_file_fuzzer to the new in-memory backendNelson Elhage2018-10-091-25/+18
| | | | |
| * | | | config: Refactor `git_config_backend_from_string` to take a lengthNelson Elhage2018-10-093-6/+8
| | | | |
* | | | | Merge pull request #4828 from csware/git_futils_rmdir_r_failingEdward Thomson2018-10-071-0/+22
|\ \ \ \ \ | | | | | | | | | | | | Add some more tests for git_futils_rmdir_r and some cleanup
| * | | | | tests: sanitize file hierarchy after running rmdir testsPatrick Steinhardt2018-10-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we do not clean up after ourselves after tests in core::rmdir have created new files in the directory hierarchy. This may leave stale files and/or directories after having run tests, confusing subsequent tests that expect a pristine test environment. Most importantly, it may cause the test initialization to fail which expects being able to re-create the testing hierarchy before each test in case where another test hasn't cleaned up after itself. Fix the issue by adding a cleanup function that removes the temporary testing hierarchy after each test if it still exists.
| * | | | | tests: Add some more tests for git_futils_rmdir_rSven Strickroth2018-10-051-0/+16
| | |_|_|/ | |/| | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | Merge pull request #4830 from pks-t/pks/diff-stats-rename-commonEdward Thomson2018-10-0714-5/+45
|\ \ \ \ \ | | | | | | | | | | | | diff_stats: use git's formatting of renames with common directories